{- 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.SetTraceParams 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.TraceValue
import qualified Language.LSP.Protocol.Types.Common

{-|

-}
data SetTraceParams = SetTraceParams 
  { {-|

  -}
  SetTraceParams -> TraceValue
_value :: Language.LSP.Protocol.Internal.Types.TraceValue.TraceValue
  }
  deriving stock (Int -> SetTraceParams -> ShowS
[SetTraceParams] -> ShowS
SetTraceParams -> String
(Int -> SetTraceParams -> ShowS)
-> (SetTraceParams -> String)
-> ([SetTraceParams] -> ShowS)
-> Show SetTraceParams
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SetTraceParams -> ShowS
showsPrec :: Int -> SetTraceParams -> ShowS
$cshow :: SetTraceParams -> String
show :: SetTraceParams -> String
$cshowList :: [SetTraceParams] -> ShowS
showList :: [SetTraceParams] -> ShowS
Show, SetTraceParams -> SetTraceParams -> Bool
(SetTraceParams -> SetTraceParams -> Bool)
-> (SetTraceParams -> SetTraceParams -> Bool) -> Eq SetTraceParams
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SetTraceParams -> SetTraceParams -> Bool
== :: SetTraceParams -> SetTraceParams -> Bool
$c/= :: SetTraceParams -> SetTraceParams -> Bool
/= :: SetTraceParams -> SetTraceParams -> Bool
Eq, Eq SetTraceParams
Eq SetTraceParams =>
(SetTraceParams -> SetTraceParams -> Ordering)
-> (SetTraceParams -> SetTraceParams -> Bool)
-> (SetTraceParams -> SetTraceParams -> Bool)
-> (SetTraceParams -> SetTraceParams -> Bool)
-> (SetTraceParams -> SetTraceParams -> Bool)
-> (SetTraceParams -> SetTraceParams -> SetTraceParams)
-> (SetTraceParams -> SetTraceParams -> SetTraceParams)
-> Ord SetTraceParams
SetTraceParams -> SetTraceParams -> Bool
SetTraceParams -> SetTraceParams -> Ordering
SetTraceParams -> SetTraceParams -> SetTraceParams
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 :: SetTraceParams -> SetTraceParams -> Ordering
compare :: SetTraceParams -> SetTraceParams -> Ordering
$c< :: SetTraceParams -> SetTraceParams -> Bool
< :: SetTraceParams -> SetTraceParams -> Bool
$c<= :: SetTraceParams -> SetTraceParams -> Bool
<= :: SetTraceParams -> SetTraceParams -> Bool
$c> :: SetTraceParams -> SetTraceParams -> Bool
> :: SetTraceParams -> SetTraceParams -> Bool
$c>= :: SetTraceParams -> SetTraceParams -> Bool
>= :: SetTraceParams -> SetTraceParams -> Bool
$cmax :: SetTraceParams -> SetTraceParams -> SetTraceParams
max :: SetTraceParams -> SetTraceParams -> SetTraceParams
$cmin :: SetTraceParams -> SetTraceParams -> SetTraceParams
min :: SetTraceParams -> SetTraceParams -> SetTraceParams
Ord, (forall x. SetTraceParams -> Rep SetTraceParams x)
-> (forall x. Rep SetTraceParams x -> SetTraceParams)
-> Generic SetTraceParams
forall x. Rep SetTraceParams x -> SetTraceParams
forall x. SetTraceParams -> Rep SetTraceParams x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SetTraceParams -> Rep SetTraceParams x
from :: forall x. SetTraceParams -> Rep SetTraceParams x
$cto :: forall x. Rep SetTraceParams x -> SetTraceParams
to :: forall x. Rep SetTraceParams x -> SetTraceParams
Generic)
  deriving anyclass (SetTraceParams -> ()
(SetTraceParams -> ()) -> NFData SetTraceParams
forall a. (a -> ()) -> NFData a
$crnf :: SetTraceParams -> ()
rnf :: SetTraceParams -> ()
NFData, Eq SetTraceParams
Eq SetTraceParams =>
(Int -> SetTraceParams -> Int)
-> (SetTraceParams -> Int) -> Hashable SetTraceParams
Int -> SetTraceParams -> Int
SetTraceParams -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> SetTraceParams -> Int
hashWithSalt :: Int -> SetTraceParams -> Int
$chash :: SetTraceParams -> Int
hash :: SetTraceParams -> Int
Hashable)
  deriving (forall ann. SetTraceParams -> Doc ann)
-> (forall ann. [SetTraceParams] -> Doc ann)
-> Pretty SetTraceParams
forall ann. [SetTraceParams] -> Doc ann
forall ann. SetTraceParams -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. SetTraceParams -> Doc ann
pretty :: forall ann. SetTraceParams -> Doc ann
$cprettyList :: forall ann. [SetTraceParams] -> Doc ann
prettyList :: forall ann. [SetTraceParams] -> Doc ann
Pretty via (ViaJSON SetTraceParams)

instance Aeson.ToJSON SetTraceParams where
  toJSON :: SetTraceParams -> Value
toJSON (SetTraceParams TraceValue
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
"value" Key -> TraceValue -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= TraceValue
arg0]]

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