{- 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.LinkedEditingRangeClientCapabilities 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 for the linked editing range request.

@since 3.16.0
-}
data LinkedEditingRangeClientCapabilities = LinkedEditingRangeClientCapabilities 
  { {-|
  Whether implementation supports dynamic registration. If this is set to `true`
  the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
  return value for the corresponding server capability as well.
  -}
  LinkedEditingRangeClientCapabilities -> Maybe Bool
_dynamicRegistration :: (Maybe Bool)
  }
  deriving stock (Int -> LinkedEditingRangeClientCapabilities -> ShowS
[LinkedEditingRangeClientCapabilities] -> ShowS
LinkedEditingRangeClientCapabilities -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LinkedEditingRangeClientCapabilities] -> ShowS
$cshowList :: [LinkedEditingRangeClientCapabilities] -> ShowS
show :: LinkedEditingRangeClientCapabilities -> String
$cshow :: LinkedEditingRangeClientCapabilities -> String
showsPrec :: Int -> LinkedEditingRangeClientCapabilities -> ShowS
$cshowsPrec :: Int -> LinkedEditingRangeClientCapabilities -> ShowS
Show, LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities -> Bool
$c/= :: LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities -> Bool
== :: LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities -> Bool
$c== :: LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities -> Bool
Eq, Eq LinkedEditingRangeClientCapabilities
LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities -> Bool
LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities -> Ordering
LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities
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 :: LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities
$cmin :: LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities
max :: LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities
$cmax :: LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities
>= :: LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities -> Bool
$c>= :: LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities -> Bool
> :: LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities -> Bool
$c> :: LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities -> Bool
<= :: LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities -> Bool
$c<= :: LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities -> Bool
< :: LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities -> Bool
$c< :: LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities -> Bool
compare :: LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities -> Ordering
$ccompare :: LinkedEditingRangeClientCapabilities
-> LinkedEditingRangeClientCapabilities -> Ordering
Ord, forall x.
Rep LinkedEditingRangeClientCapabilities x
-> LinkedEditingRangeClientCapabilities
forall x.
LinkedEditingRangeClientCapabilities
-> Rep LinkedEditingRangeClientCapabilities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LinkedEditingRangeClientCapabilities x
-> LinkedEditingRangeClientCapabilities
$cfrom :: forall x.
LinkedEditingRangeClientCapabilities
-> Rep LinkedEditingRangeClientCapabilities x
Generic)
  deriving anyclass (LinkedEditingRangeClientCapabilities -> ()
forall a. (a -> ()) -> NFData a
rnf :: LinkedEditingRangeClientCapabilities -> ()
$crnf :: LinkedEditingRangeClientCapabilities -> ()
NFData, Eq LinkedEditingRangeClientCapabilities
Int -> LinkedEditingRangeClientCapabilities -> Int
LinkedEditingRangeClientCapabilities -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: LinkedEditingRangeClientCapabilities -> Int
$chash :: LinkedEditingRangeClientCapabilities -> Int
hashWithSalt :: Int -> LinkedEditingRangeClientCapabilities -> Int
$chashWithSalt :: Int -> LinkedEditingRangeClientCapabilities -> Int
Hashable)
  deriving forall ann. [LinkedEditingRangeClientCapabilities] -> Doc ann
forall ann. LinkedEditingRangeClientCapabilities -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [LinkedEditingRangeClientCapabilities] -> Doc ann
$cprettyList :: forall ann. [LinkedEditingRangeClientCapabilities] -> Doc ann
pretty :: forall ann. LinkedEditingRangeClientCapabilities -> Doc ann
$cpretty :: forall ann. LinkedEditingRangeClientCapabilities -> Doc ann
Pretty via (ViaJSON LinkedEditingRangeClientCapabilities)

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