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