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