{- 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.SemanticTokensDeltaPartialResult 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.SemanticTokensEdit
import qualified Language.LSP.Protocol.Types.Common

{-|
@since 3.16.0
-}
data SemanticTokensDeltaPartialResult = SemanticTokensDeltaPartialResult 
  { {-|

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

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

instance Aeson.FromJSON SemanticTokensDeltaPartialResult where
  parseJSON :: Value -> Parser SemanticTokensDeltaPartialResult
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"SemanticTokensDeltaPartialResult" forall a b. (a -> b) -> a -> b
$ \Object
arg -> [SemanticTokensEdit] -> SemanticTokensDeltaPartialResult
SemanticTokensDeltaPartialResult forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"edits"