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