{- 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.ClientCodeActionLiteralOptions 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.Internal.Types.ClientCodeActionKindOptions
import qualified Language.LSP.Protocol.Types.Common

{-|
@since 3.18.0
@proposed
-}
data ClientCodeActionLiteralOptions = ClientCodeActionLiteralOptions 
  { {-|
  The code action kind is support with the following value
  set.
  -}
  ClientCodeActionLiteralOptions -> ClientCodeActionKindOptions
_codeActionKind :: Language.LSP.Protocol.Internal.Types.ClientCodeActionKindOptions.ClientCodeActionKindOptions
  }
  deriving stock (Int -> ClientCodeActionLiteralOptions -> ShowS
[ClientCodeActionLiteralOptions] -> ShowS
ClientCodeActionLiteralOptions -> String
(Int -> ClientCodeActionLiteralOptions -> ShowS)
-> (ClientCodeActionLiteralOptions -> String)
-> ([ClientCodeActionLiteralOptions] -> ShowS)
-> Show ClientCodeActionLiteralOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ClientCodeActionLiteralOptions -> ShowS
showsPrec :: Int -> ClientCodeActionLiteralOptions -> ShowS
$cshow :: ClientCodeActionLiteralOptions -> String
show :: ClientCodeActionLiteralOptions -> String
$cshowList :: [ClientCodeActionLiteralOptions] -> ShowS
showList :: [ClientCodeActionLiteralOptions] -> ShowS
Show, ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> Bool
(ClientCodeActionLiteralOptions
 -> ClientCodeActionLiteralOptions -> Bool)
-> (ClientCodeActionLiteralOptions
    -> ClientCodeActionLiteralOptions -> Bool)
-> Eq ClientCodeActionLiteralOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> Bool
== :: ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> Bool
$c/= :: ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> Bool
/= :: ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> Bool
Eq, Eq ClientCodeActionLiteralOptions
Eq ClientCodeActionLiteralOptions =>
(ClientCodeActionLiteralOptions
 -> ClientCodeActionLiteralOptions -> Ordering)
-> (ClientCodeActionLiteralOptions
    -> ClientCodeActionLiteralOptions -> Bool)
-> (ClientCodeActionLiteralOptions
    -> ClientCodeActionLiteralOptions -> Bool)
-> (ClientCodeActionLiteralOptions
    -> ClientCodeActionLiteralOptions -> Bool)
-> (ClientCodeActionLiteralOptions
    -> ClientCodeActionLiteralOptions -> Bool)
-> (ClientCodeActionLiteralOptions
    -> ClientCodeActionLiteralOptions
    -> ClientCodeActionLiteralOptions)
-> (ClientCodeActionLiteralOptions
    -> ClientCodeActionLiteralOptions
    -> ClientCodeActionLiteralOptions)
-> Ord ClientCodeActionLiteralOptions
ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> Bool
ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> Ordering
ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> ClientCodeActionLiteralOptions
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 :: ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> Ordering
compare :: ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> Ordering
$c< :: ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> Bool
< :: ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> Bool
$c<= :: ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> Bool
<= :: ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> Bool
$c> :: ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> Bool
> :: ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> Bool
$c>= :: ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> Bool
>= :: ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> Bool
$cmax :: ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> ClientCodeActionLiteralOptions
max :: ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> ClientCodeActionLiteralOptions
$cmin :: ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> ClientCodeActionLiteralOptions
min :: ClientCodeActionLiteralOptions
-> ClientCodeActionLiteralOptions -> ClientCodeActionLiteralOptions
Ord, (forall x.
 ClientCodeActionLiteralOptions
 -> Rep ClientCodeActionLiteralOptions x)
-> (forall x.
    Rep ClientCodeActionLiteralOptions x
    -> ClientCodeActionLiteralOptions)
-> Generic ClientCodeActionLiteralOptions
forall x.
Rep ClientCodeActionLiteralOptions x
-> ClientCodeActionLiteralOptions
forall x.
ClientCodeActionLiteralOptions
-> Rep ClientCodeActionLiteralOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
ClientCodeActionLiteralOptions
-> Rep ClientCodeActionLiteralOptions x
from :: forall x.
ClientCodeActionLiteralOptions
-> Rep ClientCodeActionLiteralOptions x
$cto :: forall x.
Rep ClientCodeActionLiteralOptions x
-> ClientCodeActionLiteralOptions
to :: forall x.
Rep ClientCodeActionLiteralOptions x
-> ClientCodeActionLiteralOptions
Generic)
  deriving anyclass (ClientCodeActionLiteralOptions -> ()
(ClientCodeActionLiteralOptions -> ())
-> NFData ClientCodeActionLiteralOptions
forall a. (a -> ()) -> NFData a
$crnf :: ClientCodeActionLiteralOptions -> ()
rnf :: ClientCodeActionLiteralOptions -> ()
NFData, Eq ClientCodeActionLiteralOptions
Eq ClientCodeActionLiteralOptions =>
(Int -> ClientCodeActionLiteralOptions -> Int)
-> (ClientCodeActionLiteralOptions -> Int)
-> Hashable ClientCodeActionLiteralOptions
Int -> ClientCodeActionLiteralOptions -> Int
ClientCodeActionLiteralOptions -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> ClientCodeActionLiteralOptions -> Int
hashWithSalt :: Int -> ClientCodeActionLiteralOptions -> Int
$chash :: ClientCodeActionLiteralOptions -> Int
hash :: ClientCodeActionLiteralOptions -> Int
Hashable)
  deriving (forall ann. ClientCodeActionLiteralOptions -> Doc ann)
-> (forall ann. [ClientCodeActionLiteralOptions] -> Doc ann)
-> Pretty ClientCodeActionLiteralOptions
forall ann. [ClientCodeActionLiteralOptions] -> Doc ann
forall ann. ClientCodeActionLiteralOptions -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. ClientCodeActionLiteralOptions -> Doc ann
pretty :: forall ann. ClientCodeActionLiteralOptions -> Doc ann
$cprettyList :: forall ann. [ClientCodeActionLiteralOptions] -> Doc ann
prettyList :: forall ann. [ClientCodeActionLiteralOptions] -> Doc ann
Pretty via (ViaJSON ClientCodeActionLiteralOptions)

instance Aeson.ToJSON ClientCodeActionLiteralOptions where
  toJSON :: ClientCodeActionLiteralOptions -> Value
toJSON (ClientCodeActionLiteralOptions ClientCodeActionKindOptions
arg0) = [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
$  [[Key
"codeActionKind" Key -> ClientCodeActionKindOptions -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= ClientCodeActionKindOptions
arg0]]

instance Aeson.FromJSON ClientCodeActionLiteralOptions where
  parseJSON :: Value -> Parser ClientCodeActionLiteralOptions
parseJSON = String
-> (Object -> Parser ClientCodeActionLiteralOptions)
-> Value
-> Parser ClientCodeActionLiteralOptions
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"ClientCodeActionLiteralOptions" ((Object -> Parser ClientCodeActionLiteralOptions)
 -> Value -> Parser ClientCodeActionLiteralOptions)
-> (Object -> Parser ClientCodeActionLiteralOptions)
-> Value
-> Parser ClientCodeActionLiteralOptions
forall a b. (a -> b) -> a -> b
$ \Object
arg -> ClientCodeActionKindOptions -> ClientCodeActionLiteralOptions
ClientCodeActionLiteralOptions (ClientCodeActionKindOptions -> ClientCodeActionLiteralOptions)
-> Parser ClientCodeActionKindOptions
-> Parser ClientCodeActionLiteralOptions
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg Object -> Key -> Parser ClientCodeActionKindOptions
forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"codeActionKind"