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