{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
module Language.LSP.Protocol.Internal.Types.ImplementationClientCapabilities 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 Language.LSP.Protocol.Types.Common
data ImplementationClientCapabilities = ImplementationClientCapabilities
{
ImplementationClientCapabilities -> Maybe Bool
_dynamicRegistration :: (Maybe Bool)
,
ImplementationClientCapabilities -> Maybe Bool
_linkSupport :: (Maybe Bool)
}
deriving stock (Int -> ImplementationClientCapabilities -> ShowS
[ImplementationClientCapabilities] -> ShowS
ImplementationClientCapabilities -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImplementationClientCapabilities] -> ShowS
$cshowList :: [ImplementationClientCapabilities] -> ShowS
show :: ImplementationClientCapabilities -> String
$cshow :: ImplementationClientCapabilities -> String
showsPrec :: Int -> ImplementationClientCapabilities -> ShowS
$cshowsPrec :: Int -> ImplementationClientCapabilities -> ShowS
Show, ImplementationClientCapabilities
-> ImplementationClientCapabilities -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImplementationClientCapabilities
-> ImplementationClientCapabilities -> Bool
$c/= :: ImplementationClientCapabilities
-> ImplementationClientCapabilities -> Bool
== :: ImplementationClientCapabilities
-> ImplementationClientCapabilities -> Bool
$c== :: ImplementationClientCapabilities
-> ImplementationClientCapabilities -> Bool
Eq, Eq ImplementationClientCapabilities
ImplementationClientCapabilities
-> ImplementationClientCapabilities -> Bool
ImplementationClientCapabilities
-> ImplementationClientCapabilities -> Ordering
ImplementationClientCapabilities
-> ImplementationClientCapabilities
-> ImplementationClientCapabilities
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 :: ImplementationClientCapabilities
-> ImplementationClientCapabilities
-> ImplementationClientCapabilities
$cmin :: ImplementationClientCapabilities
-> ImplementationClientCapabilities
-> ImplementationClientCapabilities
max :: ImplementationClientCapabilities
-> ImplementationClientCapabilities
-> ImplementationClientCapabilities
$cmax :: ImplementationClientCapabilities
-> ImplementationClientCapabilities
-> ImplementationClientCapabilities
>= :: ImplementationClientCapabilities
-> ImplementationClientCapabilities -> Bool
$c>= :: ImplementationClientCapabilities
-> ImplementationClientCapabilities -> Bool
> :: ImplementationClientCapabilities
-> ImplementationClientCapabilities -> Bool
$c> :: ImplementationClientCapabilities
-> ImplementationClientCapabilities -> Bool
<= :: ImplementationClientCapabilities
-> ImplementationClientCapabilities -> Bool
$c<= :: ImplementationClientCapabilities
-> ImplementationClientCapabilities -> Bool
< :: ImplementationClientCapabilities
-> ImplementationClientCapabilities -> Bool
$c< :: ImplementationClientCapabilities
-> ImplementationClientCapabilities -> Bool
compare :: ImplementationClientCapabilities
-> ImplementationClientCapabilities -> Ordering
$ccompare :: ImplementationClientCapabilities
-> ImplementationClientCapabilities -> Ordering
Ord, forall x.
Rep ImplementationClientCapabilities x
-> ImplementationClientCapabilities
forall x.
ImplementationClientCapabilities
-> Rep ImplementationClientCapabilities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ImplementationClientCapabilities x
-> ImplementationClientCapabilities
$cfrom :: forall x.
ImplementationClientCapabilities
-> Rep ImplementationClientCapabilities x
Generic)
deriving anyclass (ImplementationClientCapabilities -> ()
forall a. (a -> ()) -> NFData a
rnf :: ImplementationClientCapabilities -> ()
$crnf :: ImplementationClientCapabilities -> ()
NFData, Eq ImplementationClientCapabilities
Int -> ImplementationClientCapabilities -> Int
ImplementationClientCapabilities -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: ImplementationClientCapabilities -> Int
$chash :: ImplementationClientCapabilities -> Int
hashWithSalt :: Int -> ImplementationClientCapabilities -> Int
$chashWithSalt :: Int -> ImplementationClientCapabilities -> Int
Hashable)
deriving forall ann. [ImplementationClientCapabilities] -> Doc ann
forall ann. ImplementationClientCapabilities -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [ImplementationClientCapabilities] -> Doc ann
$cprettyList :: forall ann. [ImplementationClientCapabilities] -> Doc ann
pretty :: forall ann. ImplementationClientCapabilities -> Doc ann
$cpretty :: forall ann. ImplementationClientCapabilities -> Doc ann
Pretty via (ViaJSON ImplementationClientCapabilities)
instance Aeson.ToJSON ImplementationClientCapabilities where
toJSON :: ImplementationClientCapabilities -> Value
toJSON (ImplementationClientCapabilities Maybe Bool
arg0 Maybe Bool
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
$ [String
"dynamicRegistration" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg0
,String
"linkSupport" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg1]
instance Aeson.FromJSON ImplementationClientCapabilities where
parseJSON :: Value -> Parser ImplementationClientCapabilities
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"ImplementationClientCapabilities" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool -> Maybe Bool -> ImplementationClientCapabilities
ImplementationClientCapabilities forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Aeson..:! Key
"dynamicRegistration" 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
"linkSupport"