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