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

{-|

-}
data FoldingRangeOptions = FoldingRangeOptions 
  { {-|

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

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