{-# 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
(Int -> WorkDoneProgressCancelParams -> ShowS)
-> (WorkDoneProgressCancelParams -> String)
-> ([WorkDoneProgressCancelParams] -> ShowS)
-> Show WorkDoneProgressCancelParams
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WorkDoneProgressCancelParams -> ShowS
showsPrec :: Int -> WorkDoneProgressCancelParams -> ShowS
$cshow :: WorkDoneProgressCancelParams -> String
show :: WorkDoneProgressCancelParams -> String
$cshowList :: [WorkDoneProgressCancelParams] -> ShowS
showList :: [WorkDoneProgressCancelParams] -> ShowS
Show, WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> Bool
(WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> Bool)
-> (WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> Bool)
-> Eq WorkDoneProgressCancelParams
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> Bool
== :: WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> Bool
$c/= :: WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> Bool
/= :: WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> Bool
Eq, Eq WorkDoneProgressCancelParams
Eq WorkDoneProgressCancelParams =>
(WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> Ordering)
-> (WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> Bool)
-> (WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> Bool)
-> (WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> Bool)
-> (WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> Bool)
-> (WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> WorkDoneProgressCancelParams)
-> (WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> WorkDoneProgressCancelParams)
-> Ord 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
$ccompare :: WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> Ordering
compare :: WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> Ordering
$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
>= :: WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> Bool
$cmax :: WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> WorkDoneProgressCancelParams
max :: WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> WorkDoneProgressCancelParams
$cmin :: WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> WorkDoneProgressCancelParams
min :: WorkDoneProgressCancelParams
-> WorkDoneProgressCancelParams -> WorkDoneProgressCancelParams
Ord, (forall x.
WorkDoneProgressCancelParams -> Rep WorkDoneProgressCancelParams x)
-> (forall x.
Rep WorkDoneProgressCancelParams x -> WorkDoneProgressCancelParams)
-> Generic WorkDoneProgressCancelParams
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
$cfrom :: forall x.
WorkDoneProgressCancelParams -> Rep WorkDoneProgressCancelParams x
from :: forall x.
WorkDoneProgressCancelParams -> Rep WorkDoneProgressCancelParams x
$cto :: forall x.
Rep WorkDoneProgressCancelParams x -> WorkDoneProgressCancelParams
to :: forall x.
Rep WorkDoneProgressCancelParams x -> WorkDoneProgressCancelParams
Generic)
deriving anyclass (WorkDoneProgressCancelParams -> ()
(WorkDoneProgressCancelParams -> ())
-> NFData WorkDoneProgressCancelParams
forall a. (a -> ()) -> NFData a
$crnf :: WorkDoneProgressCancelParams -> ()
rnf :: WorkDoneProgressCancelParams -> ()
NFData, Eq WorkDoneProgressCancelParams
Eq WorkDoneProgressCancelParams =>
(Int -> WorkDoneProgressCancelParams -> Int)
-> (WorkDoneProgressCancelParams -> Int)
-> Hashable WorkDoneProgressCancelParams
Int -> WorkDoneProgressCancelParams -> Int
WorkDoneProgressCancelParams -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> WorkDoneProgressCancelParams -> Int
hashWithSalt :: Int -> WorkDoneProgressCancelParams -> Int
$chash :: WorkDoneProgressCancelParams -> Int
hash :: WorkDoneProgressCancelParams -> Int
Hashable)
deriving (forall ann. WorkDoneProgressCancelParams -> Doc ann)
-> (forall ann. [WorkDoneProgressCancelParams] -> Doc ann)
-> Pretty WorkDoneProgressCancelParams
forall ann. [WorkDoneProgressCancelParams] -> Doc ann
forall ann. WorkDoneProgressCancelParams -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. WorkDoneProgressCancelParams -> Doc ann
pretty :: forall ann. WorkDoneProgressCancelParams -> Doc ann
$cprettyList :: forall ann. [WorkDoneProgressCancelParams] -> Doc ann
prettyList :: 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 ([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
$ [[Key
"token" Key -> ProgressToken -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= ProgressToken
arg0]]
instance Aeson.FromJSON WorkDoneProgressCancelParams where
parseJSON :: Value -> Parser WorkDoneProgressCancelParams
parseJSON = String
-> (Object -> Parser WorkDoneProgressCancelParams)
-> Value
-> Parser WorkDoneProgressCancelParams
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"WorkDoneProgressCancelParams" ((Object -> Parser WorkDoneProgressCancelParams)
-> Value -> Parser WorkDoneProgressCancelParams)
-> (Object -> Parser WorkDoneProgressCancelParams)
-> Value
-> Parser WorkDoneProgressCancelParams
forall a b. (a -> b) -> a -> b
$ \Object
arg -> ProgressToken -> WorkDoneProgressCancelParams
WorkDoneProgressCancelParams (ProgressToken -> WorkDoneProgressCancelParams)
-> Parser ProgressToken -> Parser WorkDoneProgressCancelParams
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg Object -> Key -> Parser ProgressToken
forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"token"