{- 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.SignatureHelpClientCapabilities 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 as Row
import qualified Data.Row.Aeson as Aeson
import qualified Data.Row.Hashable as Hashable
import qualified Language.LSP.Protocol.Internal.Types.MarkupKind
import qualified Language.LSP.Protocol.Types.Common

{-|
Client Capabilities for a `SignatureHelpRequest`.
-}
data SignatureHelpClientCapabilities = SignatureHelpClientCapabilities 
  { {-|
  Whether signature help supports dynamic registration.
  -}
  SignatureHelpClientCapabilities -> Maybe Bool
_dynamicRegistration :: (Maybe Bool)
  , {-|
  The client supports the following `SignatureInformation`
  specific properties.
  -}
  SignatureHelpClientCapabilities
-> Maybe
     (Rec
        (("documentationFormat" .== Maybe [MarkupKind])
         .+ (("parameterInformation"
              .== Maybe
                    (Rec
                       (Extend "labelOffsetSupport" (Maybe Bool) ('R '[]) .+ 'R '[])))
             .+ (("activeParameterSupport" .== Maybe Bool) .+ 'R '[]))))
_signatureInformation :: (Maybe (Row.Rec ("documentationFormat" Row..== (Maybe [Language.LSP.Protocol.Internal.Types.MarkupKind.MarkupKind]) Row..+ ("parameterInformation" Row..== (Maybe (Row.Rec ("labelOffsetSupport" Row..== (Maybe Bool) Row..+ Row.Empty))) Row..+ ("activeParameterSupport" Row..== (Maybe Bool) Row..+ Row.Empty)))))
  , {-|
  The client supports to send additional context information for a
  `textDocument/signatureHelp` request. A client that opts into
  contextSupport will also support the `retriggerCharacters` on
  `SignatureHelpOptions`.

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

instance Aeson.ToJSON SignatureHelpClientCapabilities where
  toJSON :: SignatureHelpClientCapabilities -> Value
toJSON (SignatureHelpClientCapabilities Maybe Bool
arg0 Maybe
  (Rec
     (("documentationFormat" .== Maybe [MarkupKind])
      .+ (("parameterInformation"
           .== Maybe
                 (Rec
                    (Extend "labelOffsetSupport" (Maybe Bool) ('R '[]) .+ 'R '[])))
          .+ (("activeParameterSupport" .== Maybe Bool) .+ 'R '[]))))
arg1 Maybe Bool
arg2) = [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
"signatureInformation" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe
  (Rec
     (("documentationFormat" .== Maybe [MarkupKind])
      .+ (("parameterInformation"
           .== Maybe
                 (Rec
                    (Extend "labelOffsetSupport" (Maybe Bool) ('R '[]) .+ 'R '[])))
          .+ (("activeParameterSupport" .== Maybe Bool) .+ 'R '[]))))
arg1
    ,String
"contextSupport" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg2]

instance Aeson.FromJSON SignatureHelpClientCapabilities where
  parseJSON :: Value -> Parser SignatureHelpClientCapabilities
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"SignatureHelpClientCapabilities" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool
-> Maybe
     (Rec
        (("documentationFormat" .== Maybe [MarkupKind])
         .+ (("parameterInformation"
              .== Maybe
                    (Rec
                       (Extend "labelOffsetSupport" (Maybe Bool) ('R '[]) .+ 'R '[])))
             .+ (("activeParameterSupport" .== Maybe Bool) .+ 'R '[]))))
-> Maybe Bool
-> SignatureHelpClientCapabilities
SignatureHelpClientCapabilities 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
"signatureInformation" 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
"contextSupport"