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