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