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