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

{-|
Call hierarchy options used during static registration.

@since 3.16.0
-}
data CallHierarchyOptions = CallHierarchyOptions 
  { {-|

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

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