{-# 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.QueryParameterMatch where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data QueryParameterMatch = QueryParameterMatch'
{
QueryParameterMatch -> Maybe Text
exact :: Prelude.Maybe Prelude.Text
}
deriving (QueryParameterMatch -> QueryParameterMatch -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: QueryParameterMatch -> QueryParameterMatch -> Bool
$c/= :: QueryParameterMatch -> QueryParameterMatch -> Bool
== :: QueryParameterMatch -> QueryParameterMatch -> Bool
$c== :: QueryParameterMatch -> QueryParameterMatch -> Bool
Prelude.Eq, ReadPrec [QueryParameterMatch]
ReadPrec QueryParameterMatch
Int -> ReadS QueryParameterMatch
ReadS [QueryParameterMatch]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [QueryParameterMatch]
$creadListPrec :: ReadPrec [QueryParameterMatch]
readPrec :: ReadPrec QueryParameterMatch
$creadPrec :: ReadPrec QueryParameterMatch
readList :: ReadS [QueryParameterMatch]
$creadList :: ReadS [QueryParameterMatch]
readsPrec :: Int -> ReadS QueryParameterMatch
$creadsPrec :: Int -> ReadS QueryParameterMatch
Prelude.Read, Int -> QueryParameterMatch -> ShowS
[QueryParameterMatch] -> ShowS
QueryParameterMatch -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [QueryParameterMatch] -> ShowS
$cshowList :: [QueryParameterMatch] -> ShowS
show :: QueryParameterMatch -> String
$cshow :: QueryParameterMatch -> String
showsPrec :: Int -> QueryParameterMatch -> ShowS
$cshowsPrec :: Int -> QueryParameterMatch -> ShowS
Prelude.Show, forall x. Rep QueryParameterMatch x -> QueryParameterMatch
forall x. QueryParameterMatch -> Rep QueryParameterMatch x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep QueryParameterMatch x -> QueryParameterMatch
$cfrom :: forall x. QueryParameterMatch -> Rep QueryParameterMatch x
Prelude.Generic)
newQueryParameterMatch ::
QueryParameterMatch
newQueryParameterMatch :: QueryParameterMatch
newQueryParameterMatch =
QueryParameterMatch' {$sel:exact:QueryParameterMatch' :: Maybe Text
exact = forall a. Maybe a
Prelude.Nothing}
queryParameterMatch_exact :: Lens.Lens' QueryParameterMatch (Prelude.Maybe Prelude.Text)
queryParameterMatch_exact :: Lens' QueryParameterMatch (Maybe Text)
queryParameterMatch_exact = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QueryParameterMatch' {Maybe Text
exact :: Maybe Text
$sel:exact:QueryParameterMatch' :: QueryParameterMatch -> Maybe Text
exact} -> Maybe Text
exact) (\s :: QueryParameterMatch
s@QueryParameterMatch' {} Maybe Text
a -> QueryParameterMatch
s {$sel:exact:QueryParameterMatch' :: Maybe Text
exact = Maybe Text
a} :: QueryParameterMatch)
instance Data.FromJSON QueryParameterMatch where
parseJSON :: Value -> Parser QueryParameterMatch
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"QueryParameterMatch"
( \Object
x ->
Maybe Text -> QueryParameterMatch
QueryParameterMatch'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"exact")
)
instance Prelude.Hashable QueryParameterMatch where
hashWithSalt :: Int -> QueryParameterMatch -> Int
hashWithSalt Int
_salt QueryParameterMatch' {Maybe Text
exact :: Maybe Text
$sel:exact:QueryParameterMatch' :: QueryParameterMatch -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
exact
instance Prelude.NFData QueryParameterMatch where
rnf :: QueryParameterMatch -> ()
rnf QueryParameterMatch' {Maybe Text
exact :: Maybe Text
$sel:exact:QueryParameterMatch' :: QueryParameterMatch -> Maybe Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
exact
instance Data.ToJSON QueryParameterMatch where
toJSON :: QueryParameterMatch -> Value
toJSON QueryParameterMatch' {Maybe Text
exact :: Maybe Text
$sel:exact:QueryParameterMatch' :: QueryParameterMatch -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"exact" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
exact]
)