{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.AppMesh.Types.HttpRouteMatch where
import Amazonka.AppMesh.Types.HttpMethod
import Amazonka.AppMesh.Types.HttpPathMatch
import Amazonka.AppMesh.Types.HttpQueryParameter
import Amazonka.AppMesh.Types.HttpRouteHeader
import Amazonka.AppMesh.Types.HttpScheme
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data HttpRouteMatch = HttpRouteMatch'
{
HttpRouteMatch -> Maybe HttpPathMatch
path :: Prelude.Maybe HttpPathMatch,
HttpRouteMatch -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
HttpRouteMatch -> Maybe (NonEmpty HttpQueryParameter)
queryParameters :: Prelude.Maybe (Prelude.NonEmpty HttpQueryParameter),
:: Prelude.Maybe (Prelude.NonEmpty HttpRouteHeader),
HttpRouteMatch -> Maybe HttpMethod
method :: Prelude.Maybe HttpMethod,
HttpRouteMatch -> Maybe HttpScheme
scheme :: Prelude.Maybe HttpScheme
}
deriving (HttpRouteMatch -> HttpRouteMatch -> Bool
(HttpRouteMatch -> HttpRouteMatch -> Bool)
-> (HttpRouteMatch -> HttpRouteMatch -> Bool) -> Eq HttpRouteMatch
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HttpRouteMatch -> HttpRouteMatch -> Bool
$c/= :: HttpRouteMatch -> HttpRouteMatch -> Bool
== :: HttpRouteMatch -> HttpRouteMatch -> Bool
$c== :: HttpRouteMatch -> HttpRouteMatch -> Bool
Prelude.Eq, ReadPrec [HttpRouteMatch]
ReadPrec HttpRouteMatch
Int -> ReadS HttpRouteMatch
ReadS [HttpRouteMatch]
(Int -> ReadS HttpRouteMatch)
-> ReadS [HttpRouteMatch]
-> ReadPrec HttpRouteMatch
-> ReadPrec [HttpRouteMatch]
-> Read HttpRouteMatch
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HttpRouteMatch]
$creadListPrec :: ReadPrec [HttpRouteMatch]
readPrec :: ReadPrec HttpRouteMatch
$creadPrec :: ReadPrec HttpRouteMatch
readList :: ReadS [HttpRouteMatch]
$creadList :: ReadS [HttpRouteMatch]
readsPrec :: Int -> ReadS HttpRouteMatch
$creadsPrec :: Int -> ReadS HttpRouteMatch
Prelude.Read, Int -> HttpRouteMatch -> ShowS
[HttpRouteMatch] -> ShowS
HttpRouteMatch -> String
(Int -> HttpRouteMatch -> ShowS)
-> (HttpRouteMatch -> String)
-> ([HttpRouteMatch] -> ShowS)
-> Show HttpRouteMatch
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HttpRouteMatch] -> ShowS
$cshowList :: [HttpRouteMatch] -> ShowS
show :: HttpRouteMatch -> String
$cshow :: HttpRouteMatch -> String
showsPrec :: Int -> HttpRouteMatch -> ShowS
$cshowsPrec :: Int -> HttpRouteMatch -> ShowS
Prelude.Show, (forall x. HttpRouteMatch -> Rep HttpRouteMatch x)
-> (forall x. Rep HttpRouteMatch x -> HttpRouteMatch)
-> Generic HttpRouteMatch
forall x. Rep HttpRouteMatch x -> HttpRouteMatch
forall x. HttpRouteMatch -> Rep HttpRouteMatch x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HttpRouteMatch x -> HttpRouteMatch
$cfrom :: forall x. HttpRouteMatch -> Rep HttpRouteMatch x
Prelude.Generic)
newHttpRouteMatch ::
HttpRouteMatch
newHttpRouteMatch :: HttpRouteMatch
newHttpRouteMatch =
HttpRouteMatch' :: Maybe HttpPathMatch
-> Maybe Text
-> Maybe (NonEmpty HttpQueryParameter)
-> Maybe (NonEmpty HttpRouteHeader)
-> Maybe HttpMethod
-> Maybe HttpScheme
-> HttpRouteMatch
HttpRouteMatch'
{ $sel:path:HttpRouteMatch' :: Maybe HttpPathMatch
path = Maybe HttpPathMatch
forall a. Maybe a
Prelude.Nothing,
$sel:prefix:HttpRouteMatch' :: Maybe Text
prefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:queryParameters:HttpRouteMatch' :: Maybe (NonEmpty HttpQueryParameter)
queryParameters = Maybe (NonEmpty HttpQueryParameter)
forall a. Maybe a
Prelude.Nothing,
$sel:headers:HttpRouteMatch' :: Maybe (NonEmpty HttpRouteHeader)
headers = Maybe (NonEmpty HttpRouteHeader)
forall a. Maybe a
Prelude.Nothing,
$sel:method:HttpRouteMatch' :: Maybe HttpMethod
method = Maybe HttpMethod
forall a. Maybe a
Prelude.Nothing,
$sel:scheme:HttpRouteMatch' :: Maybe HttpScheme
scheme = Maybe HttpScheme
forall a. Maybe a
Prelude.Nothing
}
httpRouteMatch_path :: Lens.Lens' HttpRouteMatch (Prelude.Maybe HttpPathMatch)
httpRouteMatch_path :: (Maybe HttpPathMatch -> f (Maybe HttpPathMatch))
-> HttpRouteMatch -> f HttpRouteMatch
httpRouteMatch_path = (HttpRouteMatch -> Maybe HttpPathMatch)
-> (HttpRouteMatch -> Maybe HttpPathMatch -> HttpRouteMatch)
-> Lens
HttpRouteMatch
HttpRouteMatch
(Maybe HttpPathMatch)
(Maybe HttpPathMatch)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HttpRouteMatch' {Maybe HttpPathMatch
path :: Maybe HttpPathMatch
$sel:path:HttpRouteMatch' :: HttpRouteMatch -> Maybe HttpPathMatch
path} -> Maybe HttpPathMatch
path) (\s :: HttpRouteMatch
s@HttpRouteMatch' {} Maybe HttpPathMatch
a -> HttpRouteMatch
s {$sel:path:HttpRouteMatch' :: Maybe HttpPathMatch
path = Maybe HttpPathMatch
a} :: HttpRouteMatch)
httpRouteMatch_prefix :: Lens.Lens' HttpRouteMatch (Prelude.Maybe Prelude.Text)
httpRouteMatch_prefix :: (Maybe Text -> f (Maybe Text))
-> HttpRouteMatch -> f HttpRouteMatch
httpRouteMatch_prefix = (HttpRouteMatch -> Maybe Text)
-> (HttpRouteMatch -> Maybe Text -> HttpRouteMatch)
-> Lens HttpRouteMatch HttpRouteMatch (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HttpRouteMatch' {Maybe Text
prefix :: Maybe Text
$sel:prefix:HttpRouteMatch' :: HttpRouteMatch -> Maybe Text
prefix} -> Maybe Text
prefix) (\s :: HttpRouteMatch
s@HttpRouteMatch' {} Maybe Text
a -> HttpRouteMatch
s {$sel:prefix:HttpRouteMatch' :: Maybe Text
prefix = Maybe Text
a} :: HttpRouteMatch)
httpRouteMatch_queryParameters :: Lens.Lens' HttpRouteMatch (Prelude.Maybe (Prelude.NonEmpty HttpQueryParameter))
httpRouteMatch_queryParameters :: (Maybe (NonEmpty HttpQueryParameter)
-> f (Maybe (NonEmpty HttpQueryParameter)))
-> HttpRouteMatch -> f HttpRouteMatch
httpRouteMatch_queryParameters = (HttpRouteMatch -> Maybe (NonEmpty HttpQueryParameter))
-> (HttpRouteMatch
-> Maybe (NonEmpty HttpQueryParameter) -> HttpRouteMatch)
-> Lens
HttpRouteMatch
HttpRouteMatch
(Maybe (NonEmpty HttpQueryParameter))
(Maybe (NonEmpty HttpQueryParameter))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HttpRouteMatch' {Maybe (NonEmpty HttpQueryParameter)
queryParameters :: Maybe (NonEmpty HttpQueryParameter)
$sel:queryParameters:HttpRouteMatch' :: HttpRouteMatch -> Maybe (NonEmpty HttpQueryParameter)
queryParameters} -> Maybe (NonEmpty HttpQueryParameter)
queryParameters) (\s :: HttpRouteMatch
s@HttpRouteMatch' {} Maybe (NonEmpty HttpQueryParameter)
a -> HttpRouteMatch
s {$sel:queryParameters:HttpRouteMatch' :: Maybe (NonEmpty HttpQueryParameter)
queryParameters = Maybe (NonEmpty HttpQueryParameter)
a} :: HttpRouteMatch) ((Maybe (NonEmpty HttpQueryParameter)
-> f (Maybe (NonEmpty HttpQueryParameter)))
-> HttpRouteMatch -> f HttpRouteMatch)
-> ((Maybe (NonEmpty HttpQueryParameter)
-> f (Maybe (NonEmpty HttpQueryParameter)))
-> Maybe (NonEmpty HttpQueryParameter)
-> f (Maybe (NonEmpty HttpQueryParameter)))
-> (Maybe (NonEmpty HttpQueryParameter)
-> f (Maybe (NonEmpty HttpQueryParameter)))
-> HttpRouteMatch
-> f HttpRouteMatch
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty HttpQueryParameter)
(NonEmpty HttpQueryParameter)
(NonEmpty HttpQueryParameter)
(NonEmpty HttpQueryParameter)
-> Iso
(Maybe (NonEmpty HttpQueryParameter))
(Maybe (NonEmpty HttpQueryParameter))
(Maybe (NonEmpty HttpQueryParameter))
(Maybe (NonEmpty HttpQueryParameter))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(NonEmpty HttpQueryParameter)
(NonEmpty HttpQueryParameter)
(NonEmpty HttpQueryParameter)
(NonEmpty HttpQueryParameter)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
httpRouteMatch_headers :: Lens.Lens' HttpRouteMatch (Prelude.Maybe (Prelude.NonEmpty HttpRouteHeader))
= (HttpRouteMatch -> Maybe (NonEmpty HttpRouteHeader))
-> (HttpRouteMatch
-> Maybe (NonEmpty HttpRouteHeader) -> HttpRouteMatch)
-> Lens
HttpRouteMatch
HttpRouteMatch
(Maybe (NonEmpty HttpRouteHeader))
(Maybe (NonEmpty HttpRouteHeader))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HttpRouteMatch' {Maybe (NonEmpty HttpRouteHeader)
headers :: Maybe (NonEmpty HttpRouteHeader)
$sel:headers:HttpRouteMatch' :: HttpRouteMatch -> Maybe (NonEmpty HttpRouteHeader)
headers} -> Maybe (NonEmpty HttpRouteHeader)
headers) (\s :: HttpRouteMatch
s@HttpRouteMatch' {} Maybe (NonEmpty HttpRouteHeader)
a -> HttpRouteMatch
s {$sel:headers:HttpRouteMatch' :: Maybe (NonEmpty HttpRouteHeader)
headers = Maybe (NonEmpty HttpRouteHeader)
a} :: HttpRouteMatch) ((Maybe (NonEmpty HttpRouteHeader)
-> f (Maybe (NonEmpty HttpRouteHeader)))
-> HttpRouteMatch -> f HttpRouteMatch)
-> ((Maybe (NonEmpty HttpRouteHeader)
-> f (Maybe (NonEmpty HttpRouteHeader)))
-> Maybe (NonEmpty HttpRouteHeader)
-> f (Maybe (NonEmpty HttpRouteHeader)))
-> (Maybe (NonEmpty HttpRouteHeader)
-> f (Maybe (NonEmpty HttpRouteHeader)))
-> HttpRouteMatch
-> f HttpRouteMatch
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty HttpRouteHeader)
(NonEmpty HttpRouteHeader)
(NonEmpty HttpRouteHeader)
(NonEmpty HttpRouteHeader)
-> Iso
(Maybe (NonEmpty HttpRouteHeader))
(Maybe (NonEmpty HttpRouteHeader))
(Maybe (NonEmpty HttpRouteHeader))
(Maybe (NonEmpty HttpRouteHeader))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(NonEmpty HttpRouteHeader)
(NonEmpty HttpRouteHeader)
(NonEmpty HttpRouteHeader)
(NonEmpty HttpRouteHeader)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
httpRouteMatch_method :: Lens.Lens' HttpRouteMatch (Prelude.Maybe HttpMethod)
httpRouteMatch_method :: (Maybe HttpMethod -> f (Maybe HttpMethod))
-> HttpRouteMatch -> f HttpRouteMatch
httpRouteMatch_method = (HttpRouteMatch -> Maybe HttpMethod)
-> (HttpRouteMatch -> Maybe HttpMethod -> HttpRouteMatch)
-> Lens
HttpRouteMatch HttpRouteMatch (Maybe HttpMethod) (Maybe HttpMethod)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HttpRouteMatch' {Maybe HttpMethod
method :: Maybe HttpMethod
$sel:method:HttpRouteMatch' :: HttpRouteMatch -> Maybe HttpMethod
method} -> Maybe HttpMethod
method) (\s :: HttpRouteMatch
s@HttpRouteMatch' {} Maybe HttpMethod
a -> HttpRouteMatch
s {$sel:method:HttpRouteMatch' :: Maybe HttpMethod
method = Maybe HttpMethod
a} :: HttpRouteMatch)
httpRouteMatch_scheme :: Lens.Lens' HttpRouteMatch (Prelude.Maybe HttpScheme)
httpRouteMatch_scheme :: (Maybe HttpScheme -> f (Maybe HttpScheme))
-> HttpRouteMatch -> f HttpRouteMatch
httpRouteMatch_scheme = (HttpRouteMatch -> Maybe HttpScheme)
-> (HttpRouteMatch -> Maybe HttpScheme -> HttpRouteMatch)
-> Lens
HttpRouteMatch HttpRouteMatch (Maybe HttpScheme) (Maybe HttpScheme)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HttpRouteMatch' {Maybe HttpScheme
scheme :: Maybe HttpScheme
$sel:scheme:HttpRouteMatch' :: HttpRouteMatch -> Maybe HttpScheme
scheme} -> Maybe HttpScheme
scheme) (\s :: HttpRouteMatch
s@HttpRouteMatch' {} Maybe HttpScheme
a -> HttpRouteMatch
s {$sel:scheme:HttpRouteMatch' :: Maybe HttpScheme
scheme = Maybe HttpScheme
a} :: HttpRouteMatch)
instance Core.FromJSON HttpRouteMatch where
parseJSON :: Value -> Parser HttpRouteMatch
parseJSON =
String
-> (Object -> Parser HttpRouteMatch)
-> Value
-> Parser HttpRouteMatch
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"HttpRouteMatch"
( \Object
x ->
Maybe HttpPathMatch
-> Maybe Text
-> Maybe (NonEmpty HttpQueryParameter)
-> Maybe (NonEmpty HttpRouteHeader)
-> Maybe HttpMethod
-> Maybe HttpScheme
-> HttpRouteMatch
HttpRouteMatch'
(Maybe HttpPathMatch
-> Maybe Text
-> Maybe (NonEmpty HttpQueryParameter)
-> Maybe (NonEmpty HttpRouteHeader)
-> Maybe HttpMethod
-> Maybe HttpScheme
-> HttpRouteMatch)
-> Parser (Maybe HttpPathMatch)
-> Parser
(Maybe Text
-> Maybe (NonEmpty HttpQueryParameter)
-> Maybe (NonEmpty HttpRouteHeader)
-> Maybe HttpMethod
-> Maybe HttpScheme
-> HttpRouteMatch)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe HttpPathMatch)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"path")
Parser
(Maybe Text
-> Maybe (NonEmpty HttpQueryParameter)
-> Maybe (NonEmpty HttpRouteHeader)
-> Maybe HttpMethod
-> Maybe HttpScheme
-> HttpRouteMatch)
-> Parser (Maybe Text)
-> Parser
(Maybe (NonEmpty HttpQueryParameter)
-> Maybe (NonEmpty HttpRouteHeader)
-> Maybe HttpMethod
-> Maybe HttpScheme
-> HttpRouteMatch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"prefix")
Parser
(Maybe (NonEmpty HttpQueryParameter)
-> Maybe (NonEmpty HttpRouteHeader)
-> Maybe HttpMethod
-> Maybe HttpScheme
-> HttpRouteMatch)
-> Parser (Maybe (NonEmpty HttpQueryParameter))
-> Parser
(Maybe (NonEmpty HttpRouteHeader)
-> Maybe HttpMethod -> Maybe HttpScheme -> HttpRouteMatch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty HttpQueryParameter))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"queryParameters")
Parser
(Maybe (NonEmpty HttpRouteHeader)
-> Maybe HttpMethod -> Maybe HttpScheme -> HttpRouteMatch)
-> Parser (Maybe (NonEmpty HttpRouteHeader))
-> Parser (Maybe HttpMethod -> Maybe HttpScheme -> HttpRouteMatch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty HttpRouteHeader))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"headers")
Parser (Maybe HttpMethod -> Maybe HttpScheme -> HttpRouteMatch)
-> Parser (Maybe HttpMethod)
-> Parser (Maybe HttpScheme -> HttpRouteMatch)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HttpMethod)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"method")
Parser (Maybe HttpScheme -> HttpRouteMatch)
-> Parser (Maybe HttpScheme) -> Parser HttpRouteMatch
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HttpScheme)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"scheme")
)
instance Prelude.Hashable HttpRouteMatch
instance Prelude.NFData HttpRouteMatch
instance Core.ToJSON HttpRouteMatch where
toJSON :: HttpRouteMatch -> Value
toJSON HttpRouteMatch' {Maybe (NonEmpty HttpRouteHeader)
Maybe (NonEmpty HttpQueryParameter)
Maybe Text
Maybe HttpMethod
Maybe HttpPathMatch
Maybe HttpScheme
scheme :: Maybe HttpScheme
method :: Maybe HttpMethod
headers :: Maybe (NonEmpty HttpRouteHeader)
queryParameters :: Maybe (NonEmpty HttpQueryParameter)
prefix :: Maybe Text
path :: Maybe HttpPathMatch
$sel:scheme:HttpRouteMatch' :: HttpRouteMatch -> Maybe HttpScheme
$sel:method:HttpRouteMatch' :: HttpRouteMatch -> Maybe HttpMethod
$sel:headers:HttpRouteMatch' :: HttpRouteMatch -> Maybe (NonEmpty HttpRouteHeader)
$sel:queryParameters:HttpRouteMatch' :: HttpRouteMatch -> Maybe (NonEmpty HttpQueryParameter)
$sel:prefix:HttpRouteMatch' :: HttpRouteMatch -> Maybe Text
$sel:path:HttpRouteMatch' :: HttpRouteMatch -> Maybe HttpPathMatch
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"path" Text -> HttpPathMatch -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HttpPathMatch -> Pair) -> Maybe HttpPathMatch -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HttpPathMatch
path,
(Text
"prefix" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
prefix,
(Text
"queryParameters" Text -> NonEmpty HttpQueryParameter -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(NonEmpty HttpQueryParameter -> Pair)
-> Maybe (NonEmpty HttpQueryParameter) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty HttpQueryParameter)
queryParameters,
(Text
"headers" Text -> NonEmpty HttpRouteHeader -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty HttpRouteHeader -> Pair)
-> Maybe (NonEmpty HttpRouteHeader) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty HttpRouteHeader)
headers,
(Text
"method" Text -> HttpMethod -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HttpMethod -> Pair) -> Maybe HttpMethod -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HttpMethod
method,
(Text
"scheme" Text -> HttpScheme -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HttpScheme -> Pair) -> Maybe HttpScheme -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HttpScheme
scheme
]
)