{- 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.InlayHintRegistrationOptions 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 Data.Text
import qualified Language.LSP.Protocol.Internal.Types.DocumentSelector
import qualified Language.LSP.Protocol.Types.Common

{-|
Inlay hint options used during static or dynamic registration.

@since 3.17.0
-}
data InlayHintRegistrationOptions = InlayHintRegistrationOptions 
  { {-|

  -}
  InlayHintRegistrationOptions -> Maybe Bool
_workDoneProgress :: (Maybe Bool)
  , {-|
  The server provides support to resolve additional
  information for an inlay hint item.
  -}
  InlayHintRegistrationOptions -> Maybe Bool
_resolveProvider :: (Maybe Bool)
  , {-|
  A document selector to identify the scope of the registration. If set to null
  the document selector provided on the client side will be used.
  -}
  InlayHintRegistrationOptions -> DocumentSelector |? Null
_documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)
  , {-|
  The id used to register the request. The id can be used to deregister
  the request again. See also Registration#id.
  -}
  InlayHintRegistrationOptions -> Maybe Text
_id :: (Maybe Data.Text.Text)
  }
  deriving stock (Int -> InlayHintRegistrationOptions -> ShowS
[InlayHintRegistrationOptions] -> ShowS
InlayHintRegistrationOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InlayHintRegistrationOptions] -> ShowS
$cshowList :: [InlayHintRegistrationOptions] -> ShowS
show :: InlayHintRegistrationOptions -> String
$cshow :: InlayHintRegistrationOptions -> String
showsPrec :: Int -> InlayHintRegistrationOptions -> ShowS
$cshowsPrec :: Int -> InlayHintRegistrationOptions -> ShowS
Show, InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> Bool
$c/= :: InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> Bool
== :: InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> Bool
$c== :: InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> Bool
Eq, Eq InlayHintRegistrationOptions
InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> Bool
InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> Ordering
InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> InlayHintRegistrationOptions
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 :: InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> InlayHintRegistrationOptions
$cmin :: InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> InlayHintRegistrationOptions
max :: InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> InlayHintRegistrationOptions
$cmax :: InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> InlayHintRegistrationOptions
>= :: InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> Bool
$c>= :: InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> Bool
> :: InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> Bool
$c> :: InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> Bool
<= :: InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> Bool
$c<= :: InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> Bool
< :: InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> Bool
$c< :: InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> Bool
compare :: InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> Ordering
$ccompare :: InlayHintRegistrationOptions
-> InlayHintRegistrationOptions -> Ordering
Ord, forall x.
Rep InlayHintRegistrationOptions x -> InlayHintRegistrationOptions
forall x.
InlayHintRegistrationOptions -> Rep InlayHintRegistrationOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InlayHintRegistrationOptions x -> InlayHintRegistrationOptions
$cfrom :: forall x.
InlayHintRegistrationOptions -> Rep InlayHintRegistrationOptions x
Generic)
  deriving anyclass (InlayHintRegistrationOptions -> ()
forall a. (a -> ()) -> NFData a
rnf :: InlayHintRegistrationOptions -> ()
$crnf :: InlayHintRegistrationOptions -> ()
NFData, Eq InlayHintRegistrationOptions
Int -> InlayHintRegistrationOptions -> Int
InlayHintRegistrationOptions -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: InlayHintRegistrationOptions -> Int
$chash :: InlayHintRegistrationOptions -> Int
hashWithSalt :: Int -> InlayHintRegistrationOptions -> Int
$chashWithSalt :: Int -> InlayHintRegistrationOptions -> Int
Hashable)
  deriving forall ann. [InlayHintRegistrationOptions] -> Doc ann
forall ann. InlayHintRegistrationOptions -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [InlayHintRegistrationOptions] -> Doc ann
$cprettyList :: forall ann. [InlayHintRegistrationOptions] -> Doc ann
pretty :: forall ann. InlayHintRegistrationOptions -> Doc ann
$cpretty :: forall ann. InlayHintRegistrationOptions -> Doc ann
Pretty via (ViaJSON InlayHintRegistrationOptions)

instance Aeson.ToJSON InlayHintRegistrationOptions where
  toJSON :: InlayHintRegistrationOptions -> Value
toJSON (InlayHintRegistrationOptions Maybe Bool
arg0 Maybe Bool
arg1 DocumentSelector |? Null
arg2 Maybe Text
arg3) = [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
    ,[Key
"documentSelector" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Aeson..= DocumentSelector |? Null
arg2]
    ,String
"id" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Text
arg3]

instance Aeson.FromJSON InlayHintRegistrationOptions where
  parseJSON :: Value -> Parser InlayHintRegistrationOptions
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"InlayHintRegistrationOptions" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool
-> Maybe Bool
-> (DocumentSelector |? Null)
-> Maybe Text
-> InlayHintRegistrationOptions
InlayHintRegistrationOptions 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" forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
arg forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"documentSelector" 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
"id"