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

{-|
The client capabilities of a `ExecuteCommandRequest`.
-}
data ExecuteCommandClientCapabilities = ExecuteCommandClientCapabilities 
  { {-|
  Execute command supports dynamic registration.
  -}
  ExecuteCommandClientCapabilities -> Maybe Bool
_dynamicRegistration :: (Maybe Bool)
  }
  deriving stock (Int -> ExecuteCommandClientCapabilities -> ShowS
[ExecuteCommandClientCapabilities] -> ShowS
ExecuteCommandClientCapabilities -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExecuteCommandClientCapabilities] -> ShowS
$cshowList :: [ExecuteCommandClientCapabilities] -> ShowS
show :: ExecuteCommandClientCapabilities -> String
$cshow :: ExecuteCommandClientCapabilities -> String
showsPrec :: Int -> ExecuteCommandClientCapabilities -> ShowS
$cshowsPrec :: Int -> ExecuteCommandClientCapabilities -> ShowS
Show, ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities -> Bool
$c/= :: ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities -> Bool
== :: ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities -> Bool
$c== :: ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities -> Bool
Eq, Eq ExecuteCommandClientCapabilities
ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities -> Bool
ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities -> Ordering
ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities
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 :: ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities
$cmin :: ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities
max :: ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities
$cmax :: ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities
>= :: ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities -> Bool
$c>= :: ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities -> Bool
> :: ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities -> Bool
$c> :: ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities -> Bool
<= :: ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities -> Bool
$c<= :: ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities -> Bool
< :: ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities -> Bool
$c< :: ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities -> Bool
compare :: ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities -> Ordering
$ccompare :: ExecuteCommandClientCapabilities
-> ExecuteCommandClientCapabilities -> Ordering
Ord, forall x.
Rep ExecuteCommandClientCapabilities x
-> ExecuteCommandClientCapabilities
forall x.
ExecuteCommandClientCapabilities
-> Rep ExecuteCommandClientCapabilities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExecuteCommandClientCapabilities x
-> ExecuteCommandClientCapabilities
$cfrom :: forall x.
ExecuteCommandClientCapabilities
-> Rep ExecuteCommandClientCapabilities x
Generic)
  deriving anyclass (ExecuteCommandClientCapabilities -> ()
forall a. (a -> ()) -> NFData a
rnf :: ExecuteCommandClientCapabilities -> ()
$crnf :: ExecuteCommandClientCapabilities -> ()
NFData, Eq ExecuteCommandClientCapabilities
Int -> ExecuteCommandClientCapabilities -> Int
ExecuteCommandClientCapabilities -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: ExecuteCommandClientCapabilities -> Int
$chash :: ExecuteCommandClientCapabilities -> Int
hashWithSalt :: Int -> ExecuteCommandClientCapabilities -> Int
$chashWithSalt :: Int -> ExecuteCommandClientCapabilities -> Int
Hashable)
  deriving forall ann. [ExecuteCommandClientCapabilities] -> Doc ann
forall ann. ExecuteCommandClientCapabilities -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [ExecuteCommandClientCapabilities] -> Doc ann
$cprettyList :: forall ann. [ExecuteCommandClientCapabilities] -> Doc ann
pretty :: forall ann. ExecuteCommandClientCapabilities -> Doc ann
$cpretty :: forall ann. ExecuteCommandClientCapabilities -> Doc ann
Pretty via (ViaJSON ExecuteCommandClientCapabilities)

instance Aeson.ToJSON ExecuteCommandClientCapabilities where
  toJSON :: ExecuteCommandClientCapabilities -> Value
toJSON (ExecuteCommandClientCapabilities Maybe Bool
arg0) = [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]

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