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

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