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

{-|
The client capabilities of a `DocumentLinkRequest`.
-}
data DocumentLinkClientCapabilities = DocumentLinkClientCapabilities 
  { {-|
  Whether document link supports dynamic registration.
  -}
  DocumentLinkClientCapabilities -> Maybe Bool
_dynamicRegistration :: (Maybe Bool)
  , {-|
  Whether the client supports the `tooltip` property on `DocumentLink`.

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

instance Aeson.ToJSON DocumentLinkClientCapabilities where
  toJSON :: DocumentLinkClientCapabilities -> Value
toJSON (DocumentLinkClientCapabilities Maybe Bool
arg0 Maybe Bool
arg1) = [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
    ,String
"tooltipSupport" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg1]

instance Aeson.FromJSON DocumentLinkClientCapabilities where
  parseJSON :: Value -> Parser DocumentLinkClientCapabilities
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"DocumentLinkClientCapabilities" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool -> Maybe Bool -> DocumentLinkClientCapabilities
DocumentLinkClientCapabilities 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" forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
arg forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Aeson..:! Key
"tooltipSupport"