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