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

{-|
Reference options.
-}
data ReferenceOptions = ReferenceOptions 
  { {-|

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

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