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

{-|
Inline value options used during static registration.

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

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

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