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

{-|
The client capabilities  of a `CodeLensRequest`.
-}
data CodeLensClientCapabilities = CodeLensClientCapabilities 
  { {-|
  Whether code lens supports dynamic registration.
  -}
  CodeLensClientCapabilities -> Maybe Bool
_dynamicRegistration :: (Maybe Bool)
  }
  deriving stock (Int -> CodeLensClientCapabilities -> ShowS
[CodeLensClientCapabilities] -> ShowS
CodeLensClientCapabilities -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CodeLensClientCapabilities] -> ShowS
$cshowList :: [CodeLensClientCapabilities] -> ShowS
show :: CodeLensClientCapabilities -> String
$cshow :: CodeLensClientCapabilities -> String
showsPrec :: Int -> CodeLensClientCapabilities -> ShowS
$cshowsPrec :: Int -> CodeLensClientCapabilities -> ShowS
Show, CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
$c/= :: CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
== :: CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
$c== :: CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
Eq, Eq CodeLensClientCapabilities
CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
CodeLensClientCapabilities
-> CodeLensClientCapabilities -> Ordering
CodeLensClientCapabilities
-> CodeLensClientCapabilities -> CodeLensClientCapabilities
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 :: CodeLensClientCapabilities
-> CodeLensClientCapabilities -> CodeLensClientCapabilities
$cmin :: CodeLensClientCapabilities
-> CodeLensClientCapabilities -> CodeLensClientCapabilities
max :: CodeLensClientCapabilities
-> CodeLensClientCapabilities -> CodeLensClientCapabilities
$cmax :: CodeLensClientCapabilities
-> CodeLensClientCapabilities -> CodeLensClientCapabilities
>= :: CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
$c>= :: CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
> :: CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
$c> :: CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
<= :: CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
$c<= :: CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
< :: CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
$c< :: CodeLensClientCapabilities -> CodeLensClientCapabilities -> Bool
compare :: CodeLensClientCapabilities
-> CodeLensClientCapabilities -> Ordering
$ccompare :: CodeLensClientCapabilities
-> CodeLensClientCapabilities -> Ordering
Ord, forall x.
Rep CodeLensClientCapabilities x -> CodeLensClientCapabilities
forall x.
CodeLensClientCapabilities -> Rep CodeLensClientCapabilities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CodeLensClientCapabilities x -> CodeLensClientCapabilities
$cfrom :: forall x.
CodeLensClientCapabilities -> Rep CodeLensClientCapabilities x
Generic)
  deriving anyclass (CodeLensClientCapabilities -> ()
forall a. (a -> ()) -> NFData a
rnf :: CodeLensClientCapabilities -> ()
$crnf :: CodeLensClientCapabilities -> ()
NFData, Eq CodeLensClientCapabilities
Int -> CodeLensClientCapabilities -> Int
CodeLensClientCapabilities -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: CodeLensClientCapabilities -> Int
$chash :: CodeLensClientCapabilities -> Int
hashWithSalt :: Int -> CodeLensClientCapabilities -> Int
$chashWithSalt :: Int -> CodeLensClientCapabilities -> Int
Hashable)
  deriving forall ann. [CodeLensClientCapabilities] -> Doc ann
forall ann. CodeLensClientCapabilities -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [CodeLensClientCapabilities] -> Doc ann
$cprettyList :: forall ann. [CodeLensClientCapabilities] -> Doc ann
pretty :: forall ann. CodeLensClientCapabilities -> Doc ann
$cpretty :: forall ann. CodeLensClientCapabilities -> Doc ann
Pretty via (ViaJSON CodeLensClientCapabilities)

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

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