module Stratosphere.AppMesh.GatewayRoute.QueryParameterProperty (
        module Exports, QueryParameterProperty(..),
        mkQueryParameterProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppMesh.GatewayRoute.HttpQueryParameterMatchProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data QueryParameterProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-gatewayroute-queryparameter.html>
    QueryParameterProperty {QueryParameterProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-gatewayroute-queryparameter.html#cfn-appmesh-gatewayroute-queryparameter-match>
                            QueryParameterProperty -> Maybe HttpQueryParameterMatchProperty
match :: (Prelude.Maybe HttpQueryParameterMatchProperty),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-gatewayroute-queryparameter.html#cfn-appmesh-gatewayroute-queryparameter-name>
                            QueryParameterProperty -> Value Text
name :: (Value Prelude.Text)}
  deriving stock (QueryParameterProperty -> QueryParameterProperty -> Bool
(QueryParameterProperty -> QueryParameterProperty -> Bool)
-> (QueryParameterProperty -> QueryParameterProperty -> Bool)
-> Eq QueryParameterProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: QueryParameterProperty -> QueryParameterProperty -> Bool
== :: QueryParameterProperty -> QueryParameterProperty -> Bool
$c/= :: QueryParameterProperty -> QueryParameterProperty -> Bool
/= :: QueryParameterProperty -> QueryParameterProperty -> Bool
Prelude.Eq, Int -> QueryParameterProperty -> ShowS
[QueryParameterProperty] -> ShowS
QueryParameterProperty -> String
(Int -> QueryParameterProperty -> ShowS)
-> (QueryParameterProperty -> String)
-> ([QueryParameterProperty] -> ShowS)
-> Show QueryParameterProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueryParameterProperty -> ShowS
showsPrec :: Int -> QueryParameterProperty -> ShowS
$cshow :: QueryParameterProperty -> String
show :: QueryParameterProperty -> String
$cshowList :: [QueryParameterProperty] -> ShowS
showList :: [QueryParameterProperty] -> ShowS
Prelude.Show)
mkQueryParameterProperty ::
  Value Prelude.Text -> QueryParameterProperty
mkQueryParameterProperty :: Value Text -> QueryParameterProperty
mkQueryParameterProperty Value Text
name
  = QueryParameterProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name, match :: Maybe HttpQueryParameterMatchProperty
match = Maybe HttpQueryParameterMatchProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties QueryParameterProperty where
  toResourceProperties :: QueryParameterProperty -> ResourceProperties
toResourceProperties QueryParameterProperty {Maybe HttpQueryParameterMatchProperty
()
Value Text
haddock_workaround_ :: QueryParameterProperty -> ()
match :: QueryParameterProperty -> Maybe HttpQueryParameterMatchProperty
name :: QueryParameterProperty -> Value Text
haddock_workaround_ :: ()
match :: Maybe HttpQueryParameterMatchProperty
name :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppMesh::GatewayRoute.QueryParameter",
         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
"Name" 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
name]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> HttpQueryParameterMatchProperty -> (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" (HttpQueryParameterMatchProperty -> (Key, Value))
-> Maybe HttpQueryParameterMatchProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HttpQueryParameterMatchProperty
match]))}
instance JSON.ToJSON QueryParameterProperty where
  toJSON :: QueryParameterProperty -> Value
toJSON QueryParameterProperty {Maybe HttpQueryParameterMatchProperty
()
Value Text
haddock_workaround_ :: QueryParameterProperty -> ()
match :: QueryParameterProperty -> Maybe HttpQueryParameterMatchProperty
name :: QueryParameterProperty -> Value Text
haddock_workaround_ :: ()
match :: Maybe HttpQueryParameterMatchProperty
name :: Value Text
..}
    = [(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
"Name" 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
name]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> HttpQueryParameterMatchProperty -> (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" (HttpQueryParameterMatchProperty -> (Key, Value))
-> Maybe HttpQueryParameterMatchProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HttpQueryParameterMatchProperty
match])))
instance Property "Match" QueryParameterProperty where
  type PropertyType "Match" QueryParameterProperty = HttpQueryParameterMatchProperty
  set :: PropertyType "Match" QueryParameterProperty
-> QueryParameterProperty -> QueryParameterProperty
set PropertyType "Match" QueryParameterProperty
newValue QueryParameterProperty {Maybe HttpQueryParameterMatchProperty
()
Value Text
haddock_workaround_ :: QueryParameterProperty -> ()
match :: QueryParameterProperty -> Maybe HttpQueryParameterMatchProperty
name :: QueryParameterProperty -> Value Text
haddock_workaround_ :: ()
match :: Maybe HttpQueryParameterMatchProperty
name :: Value Text
..}
    = QueryParameterProperty {match :: Maybe HttpQueryParameterMatchProperty
match = HttpQueryParameterMatchProperty
-> Maybe HttpQueryParameterMatchProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Match" QueryParameterProperty
HttpQueryParameterMatchProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
name :: Value Text
haddock_workaround_ :: ()
name :: Value Text
..}
instance Property "Name" QueryParameterProperty where
  type PropertyType "Name" QueryParameterProperty = Value Prelude.Text
  set :: PropertyType "Name" QueryParameterProperty
-> QueryParameterProperty -> QueryParameterProperty
set PropertyType "Name" QueryParameterProperty
newValue QueryParameterProperty {Maybe HttpQueryParameterMatchProperty
()
Value Text
haddock_workaround_ :: QueryParameterProperty -> ()
match :: QueryParameterProperty -> Maybe HttpQueryParameterMatchProperty
name :: QueryParameterProperty -> Value Text
haddock_workaround_ :: ()
match :: Maybe HttpQueryParameterMatchProperty
name :: Value Text
..}
    = QueryParameterProperty {name :: Value Text
name = PropertyType "Name" QueryParameterProperty
Value Text
newValue, Maybe HttpQueryParameterMatchProperty
()
haddock_workaround_ :: ()
match :: Maybe HttpQueryParameterMatchProperty
haddock_workaround_ :: ()
match :: Maybe HttpQueryParameterMatchProperty
..}