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

{-|
Provider options for a `DocumentLinkRequest`.
-}
data DocumentLinkOptions = DocumentLinkOptions 
  { {-|

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

instance Aeson.ToJSON DocumentLinkOptions where
  toJSON :: DocumentLinkOptions -> Value
toJSON (DocumentLinkOptions Maybe Bool
arg0 Maybe Bool
arg1) = [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
    ,String
"resolveProvider" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg1]

instance Aeson.FromJSON DocumentLinkOptions where
  parseJSON :: Value -> Parser DocumentLinkOptions
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"DocumentLinkOptions" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool -> Maybe Bool -> DocumentLinkOptions
DocumentLinkOptions 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" forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
arg forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Aeson..:! Key
"resolveProvider"