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