module Stratosphere.AppMesh.GatewayRoute.HttpPathMatchProperty (
        HttpPathMatchProperty(..), mkHttpPathMatchProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data HttpPathMatchProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-gatewayroute-httppathmatch.html>
    HttpPathMatchProperty {HttpPathMatchProperty -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-gatewayroute-httppathmatch.html#cfn-appmesh-gatewayroute-httppathmatch-exact>
                           HttpPathMatchProperty -> Maybe (Value Text)
exact :: (Prelude.Maybe (Value Prelude.Text)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-gatewayroute-httppathmatch.html#cfn-appmesh-gatewayroute-httppathmatch-regex>
                           HttpPathMatchProperty -> Maybe (Value Text)
regex :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (HttpPathMatchProperty -> HttpPathMatchProperty -> Bool
(HttpPathMatchProperty -> HttpPathMatchProperty -> Bool)
-> (HttpPathMatchProperty -> HttpPathMatchProperty -> Bool)
-> Eq HttpPathMatchProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: HttpPathMatchProperty -> HttpPathMatchProperty -> Bool
== :: HttpPathMatchProperty -> HttpPathMatchProperty -> Bool
$c/= :: HttpPathMatchProperty -> HttpPathMatchProperty -> Bool
/= :: HttpPathMatchProperty -> HttpPathMatchProperty -> Bool
Prelude.Eq, Int -> HttpPathMatchProperty -> ShowS
[HttpPathMatchProperty] -> ShowS
HttpPathMatchProperty -> String
(Int -> HttpPathMatchProperty -> ShowS)
-> (HttpPathMatchProperty -> String)
-> ([HttpPathMatchProperty] -> ShowS)
-> Show HttpPathMatchProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> HttpPathMatchProperty -> ShowS
showsPrec :: Int -> HttpPathMatchProperty -> ShowS
$cshow :: HttpPathMatchProperty -> String
show :: HttpPathMatchProperty -> String
$cshowList :: [HttpPathMatchProperty] -> ShowS
showList :: [HttpPathMatchProperty] -> ShowS
Prelude.Show)
mkHttpPathMatchProperty :: HttpPathMatchProperty
mkHttpPathMatchProperty :: HttpPathMatchProperty
mkHttpPathMatchProperty
  = HttpPathMatchProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), exact :: Maybe (Value Text)
exact = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       regex :: Maybe (Value Text)
regex = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties HttpPathMatchProperty where
  toResourceProperties :: HttpPathMatchProperty -> ResourceProperties
toResourceProperties HttpPathMatchProperty {Maybe (Value Text)
()
haddock_workaround_ :: HttpPathMatchProperty -> ()
exact :: HttpPathMatchProperty -> Maybe (Value Text)
regex :: HttpPathMatchProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
exact :: Maybe (Value Text)
regex :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppMesh::GatewayRoute.HttpPathMatch",
         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 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
"Exact" (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)
exact,
                            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
"Regex" (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)
regex])}
instance JSON.ToJSON HttpPathMatchProperty where
  toJSON :: HttpPathMatchProperty -> Value
toJSON HttpPathMatchProperty {Maybe (Value Text)
()
haddock_workaround_ :: HttpPathMatchProperty -> ()
exact :: HttpPathMatchProperty -> Maybe (Value Text)
regex :: HttpPathMatchProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
exact :: Maybe (Value Text)
regex :: 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 -> 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
"Exact" (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)
exact,
               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
"Regex" (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)
regex]))
instance Property "Exact" HttpPathMatchProperty where
  type PropertyType "Exact" HttpPathMatchProperty = Value Prelude.Text
  set :: PropertyType "Exact" HttpPathMatchProperty
-> HttpPathMatchProperty -> HttpPathMatchProperty
set PropertyType "Exact" HttpPathMatchProperty
newValue HttpPathMatchProperty {Maybe (Value Text)
()
haddock_workaround_ :: HttpPathMatchProperty -> ()
exact :: HttpPathMatchProperty -> Maybe (Value Text)
regex :: HttpPathMatchProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
exact :: Maybe (Value Text)
regex :: Maybe (Value Text)
..}
    = HttpPathMatchProperty {exact :: Maybe (Value Text)
exact = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Exact" HttpPathMatchProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
regex :: Maybe (Value Text)
haddock_workaround_ :: ()
regex :: Maybe (Value Text)
..}
instance Property "Regex" HttpPathMatchProperty where
  type PropertyType "Regex" HttpPathMatchProperty = Value Prelude.Text
  set :: PropertyType "Regex" HttpPathMatchProperty
-> HttpPathMatchProperty -> HttpPathMatchProperty
set PropertyType "Regex" HttpPathMatchProperty
newValue HttpPathMatchProperty {Maybe (Value Text)
()
haddock_workaround_ :: HttpPathMatchProperty -> ()
exact :: HttpPathMatchProperty -> Maybe (Value Text)
regex :: HttpPathMatchProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
exact :: Maybe (Value Text)
regex :: Maybe (Value Text)
..}
    = HttpPathMatchProperty {regex :: Maybe (Value Text)
regex = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Regex" HttpPathMatchProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
exact :: Maybe (Value Text)
haddock_workaround_ :: ()
exact :: Maybe (Value Text)
..}