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