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