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

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