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