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