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