{- 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.DeclarationOptions 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 DeclarationOptions = DeclarationOptions 
  { {-|

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

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