-- 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.HoverOptions where

import Control.DeepSeq
import Data.Hashable
import GHC.Generics
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

{-|
Hover options.
-}
data HoverOptions = HoverOptions 
  { {-|

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

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