{- 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.WorkspaceSymbolClientCapabilities 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 Data.Text
import qualified Language.LSP.Protocol.Internal.Types.SymbolKind
import qualified Language.LSP.Protocol.Internal.Types.SymbolTag
import qualified Language.LSP.Protocol.Types.Common

{-|
Client capabilities for a `WorkspaceSymbolRequest`.
-}
data WorkspaceSymbolClientCapabilities = WorkspaceSymbolClientCapabilities 
  { {-|
  Symbol request supports dynamic registration.
  -}
  WorkspaceSymbolClientCapabilities -> Maybe Bool
_dynamicRegistration :: (Maybe Bool)
  , {-|
  Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.
  -}
  WorkspaceSymbolClientCapabilities
-> Maybe
     (Rec (Extend "valueSet" (Maybe [SymbolKind]) ('R '[]) .+ 'R '[]))
_symbolKind :: (Maybe (Row.Rec ("valueSet" Row..== (Maybe [Language.LSP.Protocol.Internal.Types.SymbolKind.SymbolKind]) Row..+ Row.Empty)))
  , {-|
  The client supports tags on `SymbolInformation`.
  Clients supporting tags have to handle unknown tags gracefully.

  @since 3.16.0
  -}
  WorkspaceSymbolClientCapabilities
-> Maybe (Rec (Extend "valueSet" [SymbolTag] ('R '[]) .+ 'R '[]))
_tagSupport :: (Maybe (Row.Rec ("valueSet" Row..== [Language.LSP.Protocol.Internal.Types.SymbolTag.SymbolTag] Row..+ Row.Empty)))
  , {-|
  The client support partial workspace symbols. The client will send the
  request `workspaceSymbol/resolve` to the server to resolve additional
  properties.

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

instance Aeson.ToJSON WorkspaceSymbolClientCapabilities where
  toJSON :: WorkspaceSymbolClientCapabilities -> Value
toJSON (WorkspaceSymbolClientCapabilities Maybe Bool
arg0 Maybe
  (Rec (Extend "valueSet" (Maybe [SymbolKind]) ('R '[]) .+ 'R '[]))
arg1 Maybe (Rec (Extend "valueSet" [SymbolTag] ('R '[]) .+ 'R '[]))
arg2 Maybe (Rec (Extend "properties" [Text] ('R '[]) .+ 'R '[]))
arg3) = [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
"symbolKind" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe
  (Rec (Extend "valueSet" (Maybe [SymbolKind]) ('R '[]) .+ 'R '[]))
arg1
    ,String
"tagSupport" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe (Rec (Extend "valueSet" [SymbolTag] ('R '[]) .+ 'R '[]))
arg2
    ,String
"resolveSupport" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe (Rec (Extend "properties" [Text] ('R '[]) .+ 'R '[]))
arg3]

instance Aeson.FromJSON WorkspaceSymbolClientCapabilities where
  parseJSON :: Value -> Parser WorkspaceSymbolClientCapabilities
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"WorkspaceSymbolClientCapabilities" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool
-> Maybe
     (Rec (Extend "valueSet" (Maybe [SymbolKind]) ('R '[]) .+ 'R '[]))
-> Maybe (Rec (Extend "valueSet" [SymbolTag] ('R '[]) .+ 'R '[]))
-> Maybe (Rec (Extend "properties" [Text] ('R '[]) .+ 'R '[]))
-> WorkspaceSymbolClientCapabilities
WorkspaceSymbolClientCapabilities 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
"symbolKind" 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
"tagSupport" 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
"resolveSupport"