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