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

{-|
The Client Capabilities of a `CodeActionRequest`.
-}
data CodeActionClientCapabilities = CodeActionClientCapabilities 
  { {-|
  Whether code action supports dynamic registration.
  -}
  CodeActionClientCapabilities -> Maybe Bool
_dynamicRegistration :: (Maybe Bool)
  , {-|
  The client support code action literals of type `CodeAction` as a valid
  response of the `textDocument/codeAction` request. If the property is not
  set the request can only return `Command` literals.

  @since 3.8.0
  -}
  CodeActionClientCapabilities
-> Maybe
     (Rec
        (("codeActionKind"
          .== Rec (Extend "valueSet" [CodeActionKind] ('R '[]) .+ 'R '[]))
         .+ 'R '[]))
_codeActionLiteralSupport :: (Maybe (Row.Rec ("codeActionKind" Row..== (Row.Rec ("valueSet" Row..== [Language.LSP.Protocol.Internal.Types.CodeActionKind.CodeActionKind] Row..+ Row.Empty)) Row..+ Row.Empty)))
  , {-|
  Whether code action supports the `isPreferred` property.

  @since 3.15.0
  -}
  CodeActionClientCapabilities -> Maybe Bool
_isPreferredSupport :: (Maybe Bool)
  , {-|
  Whether code action supports the `disabled` property.

  @since 3.16.0
  -}
  CodeActionClientCapabilities -> Maybe Bool
_disabledSupport :: (Maybe Bool)
  , {-|
  Whether code action supports the `data` property which is
  preserved between a `textDocument/codeAction` and a
  `codeAction/resolve` request.

  @since 3.16.0
  -}
  CodeActionClientCapabilities -> Maybe Bool
_dataSupport :: (Maybe Bool)
  , {-|
  Whether the client supports resolving additional code action
  properties via a separate `codeAction/resolve` request.

  @since 3.16.0
  -}
  CodeActionClientCapabilities
-> Maybe (Rec (Extend "properties" [Text] ('R '[]) .+ 'R '[]))
_resolveSupport :: (Maybe (Row.Rec ("properties" Row..== [Data.Text.Text] Row..+ Row.Empty)))
  , {-|
  Whether the client honors the change annotations in
  text edits and resource operations returned via the
  `CodeAction#edit` property by for example presenting
  the workspace edit in the user interface and asking
  for confirmation.

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

instance Aeson.ToJSON CodeActionClientCapabilities where
  toJSON :: CodeActionClientCapabilities -> Value
toJSON (CodeActionClientCapabilities Maybe Bool
arg0 Maybe
  (Rec
     (("codeActionKind"
       .== Rec (Extend "valueSet" [CodeActionKind] ('R '[]) .+ 'R '[]))
      .+ 'R '[]))
arg1 Maybe Bool
arg2 Maybe Bool
arg3 Maybe Bool
arg4 Maybe (Rec (Extend "properties" [Text] ('R '[]) .+ 'R '[]))
arg5 Maybe Bool
arg6) = [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
"dynamicRegistration" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg0
    ,String
"codeActionLiteralSupport" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe
  (Rec
     (("codeActionKind"
       .== Rec (Extend "valueSet" [CodeActionKind] ('R '[]) .+ 'R '[]))
      .+ 'R '[]))
arg1
    ,String
"isPreferredSupport" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg2
    ,String
"disabledSupport" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg3
    ,String
"dataSupport" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg4
    ,String
"resolveSupport" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe (Rec (Extend "properties" [Text] ('R '[]) .+ 'R '[]))
arg5
    ,String
"honorsChangeAnnotations" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg6]

instance Aeson.FromJSON CodeActionClientCapabilities where
  parseJSON :: Value -> Parser CodeActionClientCapabilities
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"CodeActionClientCapabilities" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool
-> Maybe
     (Rec
        (("codeActionKind"
          .== Rec (Extend "valueSet" [CodeActionKind] ('R '[]) .+ 'R '[]))
         .+ 'R '[]))
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe (Rec (Extend "properties" [Text] ('R '[]) .+ 'R '[]))
-> Maybe Bool
-> CodeActionClientCapabilities
CodeActionClientCapabilities 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
"dynamicRegistration" 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
"codeActionLiteralSupport" 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
"isPreferredSupport" 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
"disabledSupport" 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
"dataSupport" 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
"resolveSupport" 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
"honorsChangeAnnotations"