{- ORMOLU_DISABLE -}
{- HLINT ignore -}
-- THIS IS A GENERATED FILE, DO NOT EDIT

{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
module Language.LSP.Protocol.Internal.Types.DiagnosticServerCancellationData 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.Types.Common

{-|
Cancellation data returned from a diagnostic request.

@since 3.17.0
-}
data DiagnosticServerCancellationData = DiagnosticServerCancellationData 
  { {-|

  -}
  DiagnosticServerCancellationData -> Bool
_retriggerRequest :: Bool
  }
  deriving stock (Int -> DiagnosticServerCancellationData -> ShowS
[DiagnosticServerCancellationData] -> ShowS
DiagnosticServerCancellationData -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DiagnosticServerCancellationData] -> ShowS
$cshowList :: [DiagnosticServerCancellationData] -> ShowS
show :: DiagnosticServerCancellationData -> String
$cshow :: DiagnosticServerCancellationData -> String
showsPrec :: Int -> DiagnosticServerCancellationData -> ShowS
$cshowsPrec :: Int -> DiagnosticServerCancellationData -> ShowS
Show, DiagnosticServerCancellationData
-> DiagnosticServerCancellationData -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DiagnosticServerCancellationData
-> DiagnosticServerCancellationData -> Bool
$c/= :: DiagnosticServerCancellationData
-> DiagnosticServerCancellationData -> Bool
== :: DiagnosticServerCancellationData
-> DiagnosticServerCancellationData -> Bool
$c== :: DiagnosticServerCancellationData
-> DiagnosticServerCancellationData -> Bool
Eq, Eq DiagnosticServerCancellationData
DiagnosticServerCancellationData
-> DiagnosticServerCancellationData -> Bool
DiagnosticServerCancellationData
-> DiagnosticServerCancellationData -> Ordering
DiagnosticServerCancellationData
-> DiagnosticServerCancellationData
-> DiagnosticServerCancellationData
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 :: DiagnosticServerCancellationData
-> DiagnosticServerCancellationData
-> DiagnosticServerCancellationData
$cmin :: DiagnosticServerCancellationData
-> DiagnosticServerCancellationData
-> DiagnosticServerCancellationData
max :: DiagnosticServerCancellationData
-> DiagnosticServerCancellationData
-> DiagnosticServerCancellationData
$cmax :: DiagnosticServerCancellationData
-> DiagnosticServerCancellationData
-> DiagnosticServerCancellationData
>= :: DiagnosticServerCancellationData
-> DiagnosticServerCancellationData -> Bool
$c>= :: DiagnosticServerCancellationData
-> DiagnosticServerCancellationData -> Bool
> :: DiagnosticServerCancellationData
-> DiagnosticServerCancellationData -> Bool
$c> :: DiagnosticServerCancellationData
-> DiagnosticServerCancellationData -> Bool
<= :: DiagnosticServerCancellationData
-> DiagnosticServerCancellationData -> Bool
$c<= :: DiagnosticServerCancellationData
-> DiagnosticServerCancellationData -> Bool
< :: DiagnosticServerCancellationData
-> DiagnosticServerCancellationData -> Bool
$c< :: DiagnosticServerCancellationData
-> DiagnosticServerCancellationData -> Bool
compare :: DiagnosticServerCancellationData
-> DiagnosticServerCancellationData -> Ordering
$ccompare :: DiagnosticServerCancellationData
-> DiagnosticServerCancellationData -> Ordering
Ord, forall x.
Rep DiagnosticServerCancellationData x
-> DiagnosticServerCancellationData
forall x.
DiagnosticServerCancellationData
-> Rep DiagnosticServerCancellationData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DiagnosticServerCancellationData x
-> DiagnosticServerCancellationData
$cfrom :: forall x.
DiagnosticServerCancellationData
-> Rep DiagnosticServerCancellationData x
Generic)
  deriving anyclass (DiagnosticServerCancellationData -> ()
forall a. (a -> ()) -> NFData a
rnf :: DiagnosticServerCancellationData -> ()
$crnf :: DiagnosticServerCancellationData -> ()
NFData, Eq DiagnosticServerCancellationData
Int -> DiagnosticServerCancellationData -> Int
DiagnosticServerCancellationData -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: DiagnosticServerCancellationData -> Int
$chash :: DiagnosticServerCancellationData -> Int
hashWithSalt :: Int -> DiagnosticServerCancellationData -> Int
$chashWithSalt :: Int -> DiagnosticServerCancellationData -> Int
Hashable)
  deriving forall ann. [DiagnosticServerCancellationData] -> Doc ann
forall ann. DiagnosticServerCancellationData -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [DiagnosticServerCancellationData] -> Doc ann
$cprettyList :: forall ann. [DiagnosticServerCancellationData] -> Doc ann
pretty :: forall ann. DiagnosticServerCancellationData -> Doc ann
$cpretty :: forall ann. DiagnosticServerCancellationData -> Doc ann
Pretty via (ViaJSON DiagnosticServerCancellationData)

instance Aeson.ToJSON DiagnosticServerCancellationData where
  toJSON :: DiagnosticServerCancellationData -> Value
toJSON (DiagnosticServerCancellationData Bool
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
"retriggerRequest" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Aeson..= Bool
arg0]]

instance Aeson.FromJSON DiagnosticServerCancellationData where
  parseJSON :: Value -> Parser DiagnosticServerCancellationData
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"DiagnosticServerCancellationData" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Bool -> DiagnosticServerCancellationData
DiagnosticServerCancellationData forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"retriggerRequest"