{- 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.ExecuteCommandRegistrationOptions 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.Types.Common

{-|
Registration options for a `ExecuteCommandRequest`.
-}
data ExecuteCommandRegistrationOptions = ExecuteCommandRegistrationOptions 
  { {-|

  -}
  ExecuteCommandRegistrationOptions -> Maybe Bool
_workDoneProgress :: (Maybe Bool)
  , {-|
  The commands to be executed on the server
  -}
  ExecuteCommandRegistrationOptions -> [Text]
_commands :: [Data.Text.Text]
  }
  deriving stock (Int -> ExecuteCommandRegistrationOptions -> ShowS
[ExecuteCommandRegistrationOptions] -> ShowS
ExecuteCommandRegistrationOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExecuteCommandRegistrationOptions] -> ShowS
$cshowList :: [ExecuteCommandRegistrationOptions] -> ShowS
show :: ExecuteCommandRegistrationOptions -> String
$cshow :: ExecuteCommandRegistrationOptions -> String
showsPrec :: Int -> ExecuteCommandRegistrationOptions -> ShowS
$cshowsPrec :: Int -> ExecuteCommandRegistrationOptions -> ShowS
Show, ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions -> Bool
$c/= :: ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions -> Bool
== :: ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions -> Bool
$c== :: ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions -> Bool
Eq, Eq ExecuteCommandRegistrationOptions
ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions -> Bool
ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions -> Ordering
ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions
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 :: ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions
$cmin :: ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions
max :: ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions
$cmax :: ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions
>= :: ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions -> Bool
$c>= :: ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions -> Bool
> :: ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions -> Bool
$c> :: ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions -> Bool
<= :: ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions -> Bool
$c<= :: ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions -> Bool
< :: ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions -> Bool
$c< :: ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions -> Bool
compare :: ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions -> Ordering
$ccompare :: ExecuteCommandRegistrationOptions
-> ExecuteCommandRegistrationOptions -> Ordering
Ord, forall x.
Rep ExecuteCommandRegistrationOptions x
-> ExecuteCommandRegistrationOptions
forall x.
ExecuteCommandRegistrationOptions
-> Rep ExecuteCommandRegistrationOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExecuteCommandRegistrationOptions x
-> ExecuteCommandRegistrationOptions
$cfrom :: forall x.
ExecuteCommandRegistrationOptions
-> Rep ExecuteCommandRegistrationOptions x
Generic)
  deriving anyclass (ExecuteCommandRegistrationOptions -> ()
forall a. (a -> ()) -> NFData a
rnf :: ExecuteCommandRegistrationOptions -> ()
$crnf :: ExecuteCommandRegistrationOptions -> ()
NFData, Eq ExecuteCommandRegistrationOptions
Int -> ExecuteCommandRegistrationOptions -> Int
ExecuteCommandRegistrationOptions -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: ExecuteCommandRegistrationOptions -> Int
$chash :: ExecuteCommandRegistrationOptions -> Int
hashWithSalt :: Int -> ExecuteCommandRegistrationOptions -> Int
$chashWithSalt :: Int -> ExecuteCommandRegistrationOptions -> Int
Hashable)
  deriving forall ann. [ExecuteCommandRegistrationOptions] -> Doc ann
forall ann. ExecuteCommandRegistrationOptions -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [ExecuteCommandRegistrationOptions] -> Doc ann
$cprettyList :: forall ann. [ExecuteCommandRegistrationOptions] -> Doc ann
pretty :: forall ann. ExecuteCommandRegistrationOptions -> Doc ann
$cpretty :: forall ann. ExecuteCommandRegistrationOptions -> Doc ann
Pretty via (ViaJSON ExecuteCommandRegistrationOptions)

instance Aeson.ToJSON ExecuteCommandRegistrationOptions where
  toJSON :: ExecuteCommandRegistrationOptions -> Value
toJSON (ExecuteCommandRegistrationOptions Maybe Bool
arg0 [Text]
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
    ,[Key
"commands" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Aeson..= [Text]
arg1]]

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