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