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

{-|
Registration options for a `DocumentSymbolRequest`.
-}
data DocumentSymbolRegistrationOptions = DocumentSymbolRegistrationOptions 
  { {-|
  A document selector to identify the scope of the registration. If set to null
  the document selector provided on the client side will be used.
  -}
  DocumentSymbolRegistrationOptions -> DocumentSelector |? Null
_documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)
  , {-|

  -}
  DocumentSymbolRegistrationOptions -> Maybe Bool
_workDoneProgress :: (Maybe Bool)
  , {-|
  A human-readable string that is shown when multiple outlines trees
  are shown for the same document.

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

instance Aeson.ToJSON DocumentSymbolRegistrationOptions where
  toJSON :: DocumentSymbolRegistrationOptions -> Value
toJSON (DocumentSymbolRegistrationOptions DocumentSelector |? Null
arg0 Maybe Bool
arg1 Maybe Text
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
$  [[Key
"documentSelector" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Aeson..= DocumentSelector |? Null
arg0]
    ,String
"workDoneProgress" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg1
    ,String
"label" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Text
arg2]

instance Aeson.FromJSON DocumentSymbolRegistrationOptions where
  parseJSON :: Value -> Parser DocumentSymbolRegistrationOptions
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"DocumentSymbolRegistrationOptions" forall a b. (a -> b) -> a -> b
$ \Object
arg -> (DocumentSelector |? Null)
-> Maybe Bool -> Maybe Text -> DocumentSymbolRegistrationOptions
DocumentSymbolRegistrationOptions forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"documentSelector" 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
"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
"label"