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

instance Aeson.ToJSON CodeLensWorkspaceClientCapabilities where
  toJSON :: CodeLensWorkspaceClientCapabilities -> Value
toJSON (CodeLensWorkspaceClientCapabilities 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 CodeLensWorkspaceClientCapabilities where
  parseJSON :: Value -> Parser CodeLensWorkspaceClientCapabilities
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"CodeLensWorkspaceClientCapabilities" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool -> CodeLensWorkspaceClientCapabilities
CodeLensWorkspaceClientCapabilities 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"