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

{-|
Registration options for a `WorkspaceSymbolRequest`.
-}
data WorkspaceSymbolRegistrationOptions = WorkspaceSymbolRegistrationOptions 
  { {-|

  -}
  WorkspaceSymbolRegistrationOptions -> Maybe Bool
_workDoneProgress :: (Maybe Bool)
  , {-|
  The server provides support to resolve additional
  information for a workspace symbol.

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

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

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