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

{-|
Client capabilities specific to inline values.

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

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