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

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

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