{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
module Language.LSP.Protocol.Internal.Types.SemanticTokensRegistrationOptions 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 as Row
import qualified Data.Row.Aeson as Aeson
import qualified Data.Row.Hashable as Hashable
import qualified Data.Text
import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector
import qualified Language.LSP.Protocol.Internal.Types.SemanticTokensLegend
import qualified Language.LSP.Protocol.Types.Common
data SemanticTokensRegistrationOptions = SemanticTokensRegistrationOptions
{
SemanticTokensRegistrationOptions -> DocumentSelector |? Null
_documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)
,
SemanticTokensRegistrationOptions -> Maybe Bool
_workDoneProgress :: (Maybe Bool)
,
SemanticTokensRegistrationOptions -> SemanticTokensLegend
_legend :: Language.LSP.Protocol.Internal.Types.SemanticTokensLegend.SemanticTokensLegend
,
SemanticTokensRegistrationOptions -> Maybe (Bool |? Rec Empty)
_range :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Row.Rec Row.Empty)))
,
SemanticTokensRegistrationOptions
-> Maybe (Bool |? Rec (Extend "delta" (Maybe Bool) Empty .+ Empty))
_full :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Row.Rec ("delta" Row..== (Maybe Bool) Row..+ Row.Empty))))
,
SemanticTokensRegistrationOptions -> Maybe Text
_id :: (Maybe Data.Text.Text)
}
deriving stock (Int -> SemanticTokensRegistrationOptions -> ShowS
[SemanticTokensRegistrationOptions] -> ShowS
SemanticTokensRegistrationOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SemanticTokensRegistrationOptions] -> ShowS
$cshowList :: [SemanticTokensRegistrationOptions] -> ShowS
show :: SemanticTokensRegistrationOptions -> String
$cshow :: SemanticTokensRegistrationOptions -> String
showsPrec :: Int -> SemanticTokensRegistrationOptions -> ShowS
$cshowsPrec :: Int -> SemanticTokensRegistrationOptions -> ShowS
Show, SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions -> Bool
$c/= :: SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions -> Bool
== :: SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions -> Bool
$c== :: SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions -> Bool
Eq, Eq SemanticTokensRegistrationOptions
SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions -> Bool
SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions -> Ordering
SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions
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 :: SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions
$cmin :: SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions
max :: SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions
$cmax :: SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions
>= :: SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions -> Bool
$c>= :: SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions -> Bool
> :: SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions -> Bool
$c> :: SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions -> Bool
<= :: SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions -> Bool
$c<= :: SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions -> Bool
< :: SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions -> Bool
$c< :: SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions -> Bool
compare :: SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions -> Ordering
$ccompare :: SemanticTokensRegistrationOptions
-> SemanticTokensRegistrationOptions -> Ordering
Ord, forall x.
Rep SemanticTokensRegistrationOptions x
-> SemanticTokensRegistrationOptions
forall x.
SemanticTokensRegistrationOptions
-> Rep SemanticTokensRegistrationOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SemanticTokensRegistrationOptions x
-> SemanticTokensRegistrationOptions
$cfrom :: forall x.
SemanticTokensRegistrationOptions
-> Rep SemanticTokensRegistrationOptions x
Generic)
deriving anyclass (SemanticTokensRegistrationOptions -> ()
forall a. (a -> ()) -> NFData a
rnf :: SemanticTokensRegistrationOptions -> ()
$crnf :: SemanticTokensRegistrationOptions -> ()
NFData, Eq SemanticTokensRegistrationOptions
Int -> SemanticTokensRegistrationOptions -> Int
SemanticTokensRegistrationOptions -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: SemanticTokensRegistrationOptions -> Int
$chash :: SemanticTokensRegistrationOptions -> Int
hashWithSalt :: Int -> SemanticTokensRegistrationOptions -> Int
$chashWithSalt :: Int -> SemanticTokensRegistrationOptions -> Int
Hashable)
deriving forall ann. [SemanticTokensRegistrationOptions] -> Doc ann
forall ann. SemanticTokensRegistrationOptions -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [SemanticTokensRegistrationOptions] -> Doc ann
$cprettyList :: forall ann. [SemanticTokensRegistrationOptions] -> Doc ann
pretty :: forall ann. SemanticTokensRegistrationOptions -> Doc ann
$cpretty :: forall ann. SemanticTokensRegistrationOptions -> Doc ann
Pretty via (ViaJSON SemanticTokensRegistrationOptions)
instance Aeson.ToJSON SemanticTokensRegistrationOptions where
toJSON :: SemanticTokensRegistrationOptions -> Value
toJSON (SemanticTokensRegistrationOptions DocumentSelector |? Null
arg0 Maybe Bool
arg1 SemanticTokensLegend
arg2 Maybe (Bool |? Rec Empty)
arg3 Maybe (Bool |? Rec (Extend "delta" (Maybe Bool) Empty .+ Empty))
arg4 Maybe Text
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
$ [[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
,[Key
"legend" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Aeson..= SemanticTokensLegend
arg2]
,String
"range" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe (Bool |? Rec Empty)
arg3
,String
"full" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe (Bool |? Rec (Extend "delta" (Maybe Bool) Empty .+ Empty))
arg4
,String
"id" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Text
arg5]
instance Aeson.FromJSON SemanticTokensRegistrationOptions where
parseJSON :: Value -> Parser SemanticTokensRegistrationOptions
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"SemanticTokensRegistrationOptions" forall a b. (a -> b) -> a -> b
$ \Object
arg -> (DocumentSelector |? Null)
-> Maybe Bool
-> SemanticTokensLegend
-> Maybe (Bool |? Rec Empty)
-> Maybe (Bool |? Rec (Extend "delta" (Maybe Bool) Empty .+ Empty))
-> Maybe Text
-> SemanticTokensRegistrationOptions
SemanticTokensRegistrationOptions 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 a
Aeson..: Key
"legend" 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
"range" 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
"full" 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
"id"