{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
module Language.LSP.Protocol.Internal.Types.RegularExpressionsClientCapabilities where
import Control.DeepSeq
import Data.Hashable
import GHC.Generics
import Language.LSP.Protocol.Utils.Misc
import Prettyprinter
import qualified Data.Aeson as Aeson
import qualified Data.Row.Aeson as Aeson
import qualified Data.Row.Hashable as Hashable
import qualified Data.Text
import qualified Language.LSP.Protocol.Types.Common
data RegularExpressionsClientCapabilities = RegularExpressionsClientCapabilities
{
RegularExpressionsClientCapabilities -> Text
_engine :: Data.Text.Text
,
RegularExpressionsClientCapabilities -> Maybe Text
_version :: (Maybe Data.Text.Text)
}
deriving stock (Int -> RegularExpressionsClientCapabilities -> ShowS
[RegularExpressionsClientCapabilities] -> ShowS
RegularExpressionsClientCapabilities -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegularExpressionsClientCapabilities] -> ShowS
$cshowList :: [RegularExpressionsClientCapabilities] -> ShowS
show :: RegularExpressionsClientCapabilities -> String
$cshow :: RegularExpressionsClientCapabilities -> String
showsPrec :: Int -> RegularExpressionsClientCapabilities -> ShowS
$cshowsPrec :: Int -> RegularExpressionsClientCapabilities -> ShowS
Show, RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Bool
$c/= :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Bool
== :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Bool
$c== :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Bool
Eq, Eq RegularExpressionsClientCapabilities
RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Bool
RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Ordering
RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities
$cmin :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities
max :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities
$cmax :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities
>= :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Bool
$c>= :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Bool
> :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Bool
$c> :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Bool
<= :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Bool
$c<= :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Bool
< :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Bool
$c< :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Bool
compare :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Ordering
$ccompare :: RegularExpressionsClientCapabilities
-> RegularExpressionsClientCapabilities -> Ordering
Ord, forall x.
Rep RegularExpressionsClientCapabilities x
-> RegularExpressionsClientCapabilities
forall x.
RegularExpressionsClientCapabilities
-> Rep RegularExpressionsClientCapabilities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RegularExpressionsClientCapabilities x
-> RegularExpressionsClientCapabilities
$cfrom :: forall x.
RegularExpressionsClientCapabilities
-> Rep RegularExpressionsClientCapabilities x
Generic)
deriving anyclass (RegularExpressionsClientCapabilities -> ()
forall a. (a -> ()) -> NFData a
rnf :: RegularExpressionsClientCapabilities -> ()
$crnf :: RegularExpressionsClientCapabilities -> ()
NFData, Eq RegularExpressionsClientCapabilities
Int -> RegularExpressionsClientCapabilities -> Int
RegularExpressionsClientCapabilities -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: RegularExpressionsClientCapabilities -> Int
$chash :: RegularExpressionsClientCapabilities -> Int
hashWithSalt :: Int -> RegularExpressionsClientCapabilities -> Int
$chashWithSalt :: Int -> RegularExpressionsClientCapabilities -> Int
Hashable)
deriving forall ann. [RegularExpressionsClientCapabilities] -> Doc ann
forall ann. RegularExpressionsClientCapabilities -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [RegularExpressionsClientCapabilities] -> Doc ann
$cprettyList :: forall ann. [RegularExpressionsClientCapabilities] -> Doc ann
pretty :: forall ann. RegularExpressionsClientCapabilities -> Doc ann
$cpretty :: forall ann. RegularExpressionsClientCapabilities -> Doc ann
Pretty via (ViaJSON RegularExpressionsClientCapabilities)
instance Aeson.ToJSON RegularExpressionsClientCapabilities where
toJSON :: RegularExpressionsClientCapabilities -> Value
toJSON (RegularExpressionsClientCapabilities Text
arg0 Maybe Text
arg1) = [Pair] -> Value
Aeson.object forall a b. (a -> b) -> a -> b
$ forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat forall a b. (a -> b) -> a -> b
$ [[Key
"engine" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Aeson..= Text
arg0]
,String
"version" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Text
arg1]
instance Aeson.FromJSON RegularExpressionsClientCapabilities where
parseJSON :: Value -> Parser RegularExpressionsClientCapabilities
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"RegularExpressionsClientCapabilities" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Text -> Maybe Text -> RegularExpressionsClientCapabilities
RegularExpressionsClientCapabilities forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"engine" forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
arg forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Aeson..:! Key
"version"