{- 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.SemanticTokensWorkspaceClientCapabilities 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

{-|
@since 3.16.0
-}
data SemanticTokensWorkspaceClientCapabilities = SemanticTokensWorkspaceClientCapabilities 
  { {-|
  Whether the client implementation supports a refresh request sent from
  the server to the client.

  Note that this event is global and will force the client to refresh all
  semantic tokens currently shown. It should be used with absolute care
  and is useful for situation where a server for example detects a project
  wide change that requires such a calculation.
  -}
  SemanticTokensWorkspaceClientCapabilities -> Maybe Bool
_refreshSupport :: (Maybe Bool)
  }
  deriving stock (Int -> SemanticTokensWorkspaceClientCapabilities -> ShowS
[SemanticTokensWorkspaceClientCapabilities] -> ShowS
SemanticTokensWorkspaceClientCapabilities -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SemanticTokensWorkspaceClientCapabilities] -> ShowS
$cshowList :: [SemanticTokensWorkspaceClientCapabilities] -> ShowS
show :: SemanticTokensWorkspaceClientCapabilities -> String
$cshow :: SemanticTokensWorkspaceClientCapabilities -> String
showsPrec :: Int -> SemanticTokensWorkspaceClientCapabilities -> ShowS
$cshowsPrec :: Int -> SemanticTokensWorkspaceClientCapabilities -> ShowS
Show, SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities -> Bool
$c/= :: SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities -> Bool
== :: SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities -> Bool
$c== :: SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities -> Bool
Eq, Eq SemanticTokensWorkspaceClientCapabilities
SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities -> Bool
SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities -> Ordering
SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities
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 :: SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities
$cmin :: SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities
max :: SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities
$cmax :: SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities
>= :: SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities -> Bool
$c>= :: SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities -> Bool
> :: SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities -> Bool
$c> :: SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities -> Bool
<= :: SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities -> Bool
$c<= :: SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities -> Bool
< :: SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities -> Bool
$c< :: SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities -> Bool
compare :: SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities -> Ordering
$ccompare :: SemanticTokensWorkspaceClientCapabilities
-> SemanticTokensWorkspaceClientCapabilities -> Ordering
Ord, forall x.
Rep SemanticTokensWorkspaceClientCapabilities x
-> SemanticTokensWorkspaceClientCapabilities
forall x.
SemanticTokensWorkspaceClientCapabilities
-> Rep SemanticTokensWorkspaceClientCapabilities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SemanticTokensWorkspaceClientCapabilities x
-> SemanticTokensWorkspaceClientCapabilities
$cfrom :: forall x.
SemanticTokensWorkspaceClientCapabilities
-> Rep SemanticTokensWorkspaceClientCapabilities x
Generic)
  deriving anyclass (SemanticTokensWorkspaceClientCapabilities -> ()
forall a. (a -> ()) -> NFData a
rnf :: SemanticTokensWorkspaceClientCapabilities -> ()
$crnf :: SemanticTokensWorkspaceClientCapabilities -> ()
NFData, Eq SemanticTokensWorkspaceClientCapabilities
Int -> SemanticTokensWorkspaceClientCapabilities -> Int
SemanticTokensWorkspaceClientCapabilities -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: SemanticTokensWorkspaceClientCapabilities -> Int
$chash :: SemanticTokensWorkspaceClientCapabilities -> Int
hashWithSalt :: Int -> SemanticTokensWorkspaceClientCapabilities -> Int
$chashWithSalt :: Int -> SemanticTokensWorkspaceClientCapabilities -> Int
Hashable)
  deriving forall ann. [SemanticTokensWorkspaceClientCapabilities] -> Doc ann
forall ann. SemanticTokensWorkspaceClientCapabilities -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [SemanticTokensWorkspaceClientCapabilities] -> Doc ann
$cprettyList :: forall ann. [SemanticTokensWorkspaceClientCapabilities] -> Doc ann
pretty :: forall ann. SemanticTokensWorkspaceClientCapabilities -> Doc ann
$cpretty :: forall ann. SemanticTokensWorkspaceClientCapabilities -> Doc ann
Pretty via (ViaJSON SemanticTokensWorkspaceClientCapabilities)

instance Aeson.ToJSON SemanticTokensWorkspaceClientCapabilities where
  toJSON :: SemanticTokensWorkspaceClientCapabilities -> Value
toJSON (SemanticTokensWorkspaceClientCapabilities Maybe 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
$  [String
"refreshSupport" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg0]

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