{- 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.ClientSemanticTokensRequestOptions 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 as Row
import qualified Data.Row.Aeson as Aeson
import qualified Data.Row.Hashable as Hashable
import qualified Language.LSP.Protocol.Internal.Types.ClientSemanticTokensRequestFullDelta
import qualified Language.LSP.Protocol.Types.Common

{-|
@since 3.18.0
@proposed
-}
data ClientSemanticTokensRequestOptions = ClientSemanticTokensRequestOptions 
  { {-|
  The client will send the `textDocument/semanticTokens/range` request if
  the server provides a corresponding handler.
  -}
  ClientSemanticTokensRequestOptions -> Maybe (Bool |? Rec Empty)
_range :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? (Row.Rec Row.Empty)))
  , {-|
  The client will send the `textDocument/semanticTokens/full` request if
  the server provides a corresponding handler.
  -}
  ClientSemanticTokensRequestOptions
-> Maybe (Bool |? ClientSemanticTokensRequestFullDelta)
_full :: (Maybe (Bool Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Internal.Types.ClientSemanticTokensRequestFullDelta.ClientSemanticTokensRequestFullDelta))
  }
  deriving stock (Int -> ClientSemanticTokensRequestOptions -> ShowS
[ClientSemanticTokensRequestOptions] -> ShowS
ClientSemanticTokensRequestOptions -> String
(Int -> ClientSemanticTokensRequestOptions -> ShowS)
-> (ClientSemanticTokensRequestOptions -> String)
-> ([ClientSemanticTokensRequestOptions] -> ShowS)
-> Show ClientSemanticTokensRequestOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ClientSemanticTokensRequestOptions -> ShowS
showsPrec :: Int -> ClientSemanticTokensRequestOptions -> ShowS
$cshow :: ClientSemanticTokensRequestOptions -> String
show :: ClientSemanticTokensRequestOptions -> String
$cshowList :: [ClientSemanticTokensRequestOptions] -> ShowS
showList :: [ClientSemanticTokensRequestOptions] -> ShowS
Show, ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions -> Bool
(ClientSemanticTokensRequestOptions
 -> ClientSemanticTokensRequestOptions -> Bool)
-> (ClientSemanticTokensRequestOptions
    -> ClientSemanticTokensRequestOptions -> Bool)
-> Eq ClientSemanticTokensRequestOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions -> Bool
== :: ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions -> Bool
$c/= :: ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions -> Bool
/= :: ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions -> Bool
Eq, Eq ClientSemanticTokensRequestOptions
Eq ClientSemanticTokensRequestOptions =>
(ClientSemanticTokensRequestOptions
 -> ClientSemanticTokensRequestOptions -> Ordering)
-> (ClientSemanticTokensRequestOptions
    -> ClientSemanticTokensRequestOptions -> Bool)
-> (ClientSemanticTokensRequestOptions
    -> ClientSemanticTokensRequestOptions -> Bool)
-> (ClientSemanticTokensRequestOptions
    -> ClientSemanticTokensRequestOptions -> Bool)
-> (ClientSemanticTokensRequestOptions
    -> ClientSemanticTokensRequestOptions -> Bool)
-> (ClientSemanticTokensRequestOptions
    -> ClientSemanticTokensRequestOptions
    -> ClientSemanticTokensRequestOptions)
-> (ClientSemanticTokensRequestOptions
    -> ClientSemanticTokensRequestOptions
    -> ClientSemanticTokensRequestOptions)
-> Ord ClientSemanticTokensRequestOptions
ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions -> Bool
ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions -> Ordering
ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions
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 :: ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions -> Ordering
compare :: ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions -> Ordering
$c< :: ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions -> Bool
< :: ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions -> Bool
$c<= :: ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions -> Bool
<= :: ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions -> Bool
$c> :: ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions -> Bool
> :: ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions -> Bool
$c>= :: ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions -> Bool
>= :: ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions -> Bool
$cmax :: ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions
max :: ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions
$cmin :: ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions
min :: ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions
-> ClientSemanticTokensRequestOptions
Ord, (forall x.
 ClientSemanticTokensRequestOptions
 -> Rep ClientSemanticTokensRequestOptions x)
-> (forall x.
    Rep ClientSemanticTokensRequestOptions x
    -> ClientSemanticTokensRequestOptions)
-> Generic ClientSemanticTokensRequestOptions
forall x.
Rep ClientSemanticTokensRequestOptions x
-> ClientSemanticTokensRequestOptions
forall x.
ClientSemanticTokensRequestOptions
-> Rep ClientSemanticTokensRequestOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
ClientSemanticTokensRequestOptions
-> Rep ClientSemanticTokensRequestOptions x
from :: forall x.
ClientSemanticTokensRequestOptions
-> Rep ClientSemanticTokensRequestOptions x
$cto :: forall x.
Rep ClientSemanticTokensRequestOptions x
-> ClientSemanticTokensRequestOptions
to :: forall x.
Rep ClientSemanticTokensRequestOptions x
-> ClientSemanticTokensRequestOptions
Generic)
  deriving anyclass (ClientSemanticTokensRequestOptions -> ()
(ClientSemanticTokensRequestOptions -> ())
-> NFData ClientSemanticTokensRequestOptions
forall a. (a -> ()) -> NFData a
$crnf :: ClientSemanticTokensRequestOptions -> ()
rnf :: ClientSemanticTokensRequestOptions -> ()
NFData, Eq ClientSemanticTokensRequestOptions
Eq ClientSemanticTokensRequestOptions =>
(Int -> ClientSemanticTokensRequestOptions -> Int)
-> (ClientSemanticTokensRequestOptions -> Int)
-> Hashable ClientSemanticTokensRequestOptions
Int -> ClientSemanticTokensRequestOptions -> Int
ClientSemanticTokensRequestOptions -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> ClientSemanticTokensRequestOptions -> Int
hashWithSalt :: Int -> ClientSemanticTokensRequestOptions -> Int
$chash :: ClientSemanticTokensRequestOptions -> Int
hash :: ClientSemanticTokensRequestOptions -> Int
Hashable)
  deriving (forall ann. ClientSemanticTokensRequestOptions -> Doc ann)
-> (forall ann. [ClientSemanticTokensRequestOptions] -> Doc ann)
-> Pretty ClientSemanticTokensRequestOptions
forall ann. [ClientSemanticTokensRequestOptions] -> Doc ann
forall ann. ClientSemanticTokensRequestOptions -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. ClientSemanticTokensRequestOptions -> Doc ann
pretty :: forall ann. ClientSemanticTokensRequestOptions -> Doc ann
$cprettyList :: forall ann. [ClientSemanticTokensRequestOptions] -> Doc ann
prettyList :: forall ann. [ClientSemanticTokensRequestOptions] -> Doc ann
Pretty via (ViaJSON ClientSemanticTokensRequestOptions)

instance Aeson.ToJSON ClientSemanticTokensRequestOptions where
  toJSON :: ClientSemanticTokensRequestOptions -> Value
toJSON (ClientSemanticTokensRequestOptions Maybe (Bool |? Rec Empty)
arg0 Maybe (Bool |? ClientSemanticTokensRequestFullDelta)
arg1) = [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
"range" String -> Maybe (Bool |? Rec Empty) -> [Pair]
forall e kv v.
(KeyValue e kv, ToJSON v) =>
String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe (Bool |? Rec Empty)
arg0
    ,String
"full" String
-> Maybe (Bool |? ClientSemanticTokensRequestFullDelta) -> [Pair]
forall e kv v.
(KeyValue e kv, ToJSON v) =>
String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe (Bool |? ClientSemanticTokensRequestFullDelta)
arg1]

instance Aeson.FromJSON ClientSemanticTokensRequestOptions where
  parseJSON :: Value -> Parser ClientSemanticTokensRequestOptions
parseJSON = String
-> (Object -> Parser ClientSemanticTokensRequestOptions)
-> Value
-> Parser ClientSemanticTokensRequestOptions
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"ClientSemanticTokensRequestOptions" ((Object -> Parser ClientSemanticTokensRequestOptions)
 -> Value -> Parser ClientSemanticTokensRequestOptions)
-> (Object -> Parser ClientSemanticTokensRequestOptions)
-> Value
-> Parser ClientSemanticTokensRequestOptions
forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe (Bool |? Rec Empty)
-> Maybe (Bool |? ClientSemanticTokensRequestFullDelta)
-> ClientSemanticTokensRequestOptions
ClientSemanticTokensRequestOptions (Maybe (Bool |? Rec Empty)
 -> Maybe (Bool |? ClientSemanticTokensRequestFullDelta)
 -> ClientSemanticTokensRequestOptions)
-> Parser (Maybe (Bool |? Rec Empty))
-> Parser
     (Maybe (Bool |? ClientSemanticTokensRequestFullDelta)
      -> ClientSemanticTokensRequestOptions)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg Object -> Key -> Parser (Maybe (Bool |? Rec Empty))
forall v. FromJSON v => Object -> Key -> Parser (Maybe v)
Language.LSP.Protocol.Types.Common..:!? Key
"range" Parser
  (Maybe (Bool |? ClientSemanticTokensRequestFullDelta)
   -> ClientSemanticTokensRequestOptions)
-> Parser (Maybe (Bool |? ClientSemanticTokensRequestFullDelta))
-> Parser ClientSemanticTokensRequestOptions
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
arg Object
-> Key
-> Parser (Maybe (Bool |? ClientSemanticTokensRequestFullDelta))
forall v. FromJSON v => Object -> Key -> Parser (Maybe v)
Language.LSP.Protocol.Types.Common..:!? Key
"full"