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

{-|
Server Capabilities for a `DefinitionRequest`.
-}
data DefinitionOptions = DefinitionOptions 
  { {-|

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

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