{- 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
(Int -> DefinitionOptions -> ShowS)
-> (DefinitionOptions -> String)
-> ([DefinitionOptions] -> ShowS)
-> Show DefinitionOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DefinitionOptions -> ShowS
showsPrec :: Int -> DefinitionOptions -> ShowS
$cshow :: DefinitionOptions -> String
show :: DefinitionOptions -> String
$cshowList :: [DefinitionOptions] -> ShowS
showList :: [DefinitionOptions] -> ShowS
Show, DefinitionOptions -> DefinitionOptions -> Bool
(DefinitionOptions -> DefinitionOptions -> Bool)
-> (DefinitionOptions -> DefinitionOptions -> Bool)
-> Eq DefinitionOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DefinitionOptions -> DefinitionOptions -> Bool
== :: DefinitionOptions -> DefinitionOptions -> Bool
$c/= :: DefinitionOptions -> DefinitionOptions -> Bool
/= :: DefinitionOptions -> DefinitionOptions -> Bool
Eq, Eq DefinitionOptions
Eq DefinitionOptions =>
(DefinitionOptions -> DefinitionOptions -> Ordering)
-> (DefinitionOptions -> DefinitionOptions -> Bool)
-> (DefinitionOptions -> DefinitionOptions -> Bool)
-> (DefinitionOptions -> DefinitionOptions -> Bool)
-> (DefinitionOptions -> DefinitionOptions -> Bool)
-> (DefinitionOptions -> DefinitionOptions -> DefinitionOptions)
-> (DefinitionOptions -> DefinitionOptions -> DefinitionOptions)
-> Ord 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
$ccompare :: DefinitionOptions -> DefinitionOptions -> Ordering
compare :: DefinitionOptions -> DefinitionOptions -> Ordering
$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
>= :: DefinitionOptions -> DefinitionOptions -> Bool
$cmax :: DefinitionOptions -> DefinitionOptions -> DefinitionOptions
max :: DefinitionOptions -> DefinitionOptions -> DefinitionOptions
$cmin :: DefinitionOptions -> DefinitionOptions -> DefinitionOptions
min :: DefinitionOptions -> DefinitionOptions -> DefinitionOptions
Ord, (forall x. DefinitionOptions -> Rep DefinitionOptions x)
-> (forall x. Rep DefinitionOptions x -> DefinitionOptions)
-> Generic DefinitionOptions
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
$cfrom :: forall x. DefinitionOptions -> Rep DefinitionOptions x
from :: forall x. DefinitionOptions -> Rep DefinitionOptions x
$cto :: forall x. Rep DefinitionOptions x -> DefinitionOptions
to :: forall x. Rep DefinitionOptions x -> DefinitionOptions
Generic)
  deriving anyclass (DefinitionOptions -> ()
(DefinitionOptions -> ()) -> NFData DefinitionOptions
forall a. (a -> ()) -> NFData a
$crnf :: DefinitionOptions -> ()
rnf :: DefinitionOptions -> ()
NFData, Eq DefinitionOptions
Eq DefinitionOptions =>
(Int -> DefinitionOptions -> Int)
-> (DefinitionOptions -> Int) -> Hashable DefinitionOptions
Int -> DefinitionOptions -> Int
DefinitionOptions -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> DefinitionOptions -> Int
hashWithSalt :: Int -> DefinitionOptions -> Int
$chash :: DefinitionOptions -> Int
hash :: DefinitionOptions -> Int
Hashable)
  deriving (forall ann. DefinitionOptions -> Doc ann)
-> (forall ann. [DefinitionOptions] -> Doc ann)
-> Pretty DefinitionOptions
forall ann. [DefinitionOptions] -> Doc ann
forall ann. DefinitionOptions -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. DefinitionOptions -> Doc ann
pretty :: forall ann. DefinitionOptions -> Doc ann
$cprettyList :: forall ann. [DefinitionOptions] -> Doc ann
prettyList :: 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 ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$ [[Pair]] -> [Pair]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat ([[Pair]] -> [Pair]) -> [[Pair]] -> [Pair]
forall a b. (a -> b) -> a -> b
$  [String
"workDoneProgress" String -> Maybe Bool -> [Pair]
forall e kv v.
(KeyValue e 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 = String
-> (Object -> Parser DefinitionOptions)
-> Value
-> Parser DefinitionOptions
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"DefinitionOptions" ((Object -> Parser DefinitionOptions)
 -> Value -> Parser DefinitionOptions)
-> (Object -> Parser DefinitionOptions)
-> Value
-> Parser DefinitionOptions
forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool -> DefinitionOptions
DefinitionOptions (Maybe Bool -> DefinitionOptions)
-> Parser (Maybe Bool) -> Parser DefinitionOptions
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg Object -> Key -> Parser (Maybe Bool)
forall v. FromJSON v => Object -> Key -> Parser (Maybe v)
Language.LSP.Protocol.Types.Common..:!? Key
"workDoneProgress"