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

{-|
Type hierarchy options used during static registration.

@since 3.17.0
-}
data TypeHierarchyOptions = TypeHierarchyOptions 
  { {-|

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

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