{- 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
(Int -> InlineValueOptions -> ShowS)
-> (InlineValueOptions -> String)
-> ([InlineValueOptions] -> ShowS)
-> Show InlineValueOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InlineValueOptions -> ShowS
showsPrec :: Int -> InlineValueOptions -> ShowS
$cshow :: InlineValueOptions -> String
show :: InlineValueOptions -> String
$cshowList :: [InlineValueOptions] -> ShowS
showList :: [InlineValueOptions] -> ShowS
Show, InlineValueOptions -> InlineValueOptions -> Bool
(InlineValueOptions -> InlineValueOptions -> Bool)
-> (InlineValueOptions -> InlineValueOptions -> Bool)
-> Eq InlineValueOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InlineValueOptions -> InlineValueOptions -> Bool
== :: InlineValueOptions -> InlineValueOptions -> Bool
$c/= :: InlineValueOptions -> InlineValueOptions -> Bool
/= :: InlineValueOptions -> InlineValueOptions -> Bool
Eq, Eq InlineValueOptions
Eq InlineValueOptions =>
(InlineValueOptions -> InlineValueOptions -> Ordering)
-> (InlineValueOptions -> InlineValueOptions -> Bool)
-> (InlineValueOptions -> InlineValueOptions -> Bool)
-> (InlineValueOptions -> InlineValueOptions -> Bool)
-> (InlineValueOptions -> InlineValueOptions -> Bool)
-> (InlineValueOptions -> InlineValueOptions -> InlineValueOptions)
-> (InlineValueOptions -> InlineValueOptions -> InlineValueOptions)
-> Ord 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
$ccompare :: InlineValueOptions -> InlineValueOptions -> Ordering
compare :: InlineValueOptions -> InlineValueOptions -> Ordering
$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
>= :: InlineValueOptions -> InlineValueOptions -> Bool
$cmax :: InlineValueOptions -> InlineValueOptions -> InlineValueOptions
max :: InlineValueOptions -> InlineValueOptions -> InlineValueOptions
$cmin :: InlineValueOptions -> InlineValueOptions -> InlineValueOptions
min :: InlineValueOptions -> InlineValueOptions -> InlineValueOptions
Ord, (forall x. InlineValueOptions -> Rep InlineValueOptions x)
-> (forall x. Rep InlineValueOptions x -> InlineValueOptions)
-> Generic InlineValueOptions
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
$cfrom :: forall x. InlineValueOptions -> Rep InlineValueOptions x
from :: forall x. InlineValueOptions -> Rep InlineValueOptions x
$cto :: forall x. Rep InlineValueOptions x -> InlineValueOptions
to :: forall x. Rep InlineValueOptions x -> InlineValueOptions
Generic)
  deriving anyclass (InlineValueOptions -> ()
(InlineValueOptions -> ()) -> NFData InlineValueOptions
forall a. (a -> ()) -> NFData a
$crnf :: InlineValueOptions -> ()
rnf :: InlineValueOptions -> ()
NFData, Eq InlineValueOptions
Eq InlineValueOptions =>
(Int -> InlineValueOptions -> Int)
-> (InlineValueOptions -> Int) -> Hashable InlineValueOptions
Int -> InlineValueOptions -> Int
InlineValueOptions -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> InlineValueOptions -> Int
hashWithSalt :: Int -> InlineValueOptions -> Int
$chash :: InlineValueOptions -> Int
hash :: InlineValueOptions -> Int
Hashable)
  deriving (forall ann. InlineValueOptions -> Doc ann)
-> (forall ann. [InlineValueOptions] -> Doc ann)
-> Pretty InlineValueOptions
forall ann. [InlineValueOptions] -> Doc ann
forall ann. InlineValueOptions -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. InlineValueOptions -> Doc ann
pretty :: forall ann. InlineValueOptions -> Doc ann
$cprettyList :: forall ann. [InlineValueOptions] -> Doc ann
prettyList :: 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 ([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 InlineValueOptions where
  parseJSON :: Value -> Parser InlineValueOptions
parseJSON = String
-> (Object -> Parser InlineValueOptions)
-> Value
-> Parser InlineValueOptions
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"InlineValueOptions" ((Object -> Parser InlineValueOptions)
 -> Value -> Parser InlineValueOptions)
-> (Object -> Parser InlineValueOptions)
-> Value
-> Parser InlineValueOptions
forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool -> InlineValueOptions
InlineValueOptions (Maybe Bool -> InlineValueOptions)
-> Parser (Maybe Bool) -> Parser InlineValueOptions
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"