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

{-|
Provider options for a `DocumentHighlightRequest`.
-}
data DocumentHighlightOptions = DocumentHighlightOptions 
  { {-|

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

instance Aeson.ToJSON DocumentHighlightOptions where
  toJSON :: DocumentHighlightOptions -> Value
toJSON (DocumentHighlightOptions Maybe Bool
arg0) = [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]

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