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

{-|

-}
data ExecutionSummary = ExecutionSummary 
  { {-|
  A strict monotonically increasing value
  indicating the execution order of a cell
  inside a notebook.
  -}
  ExecutionSummary -> UInt
_executionOrder :: Language.LSP.Protocol.Types.Common.UInt
  , {-|
  Whether the execution was successful or
  not if known by the client.
  -}
  ExecutionSummary -> Maybe Bool
_success :: (Maybe Bool)
  }
  deriving stock (Int -> ExecutionSummary -> ShowS
[ExecutionSummary] -> ShowS
ExecutionSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExecutionSummary] -> ShowS
$cshowList :: [ExecutionSummary] -> ShowS
show :: ExecutionSummary -> String
$cshow :: ExecutionSummary -> String
showsPrec :: Int -> ExecutionSummary -> ShowS
$cshowsPrec :: Int -> ExecutionSummary -> ShowS
Show, ExecutionSummary -> ExecutionSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExecutionSummary -> ExecutionSummary -> Bool
$c/= :: ExecutionSummary -> ExecutionSummary -> Bool
== :: ExecutionSummary -> ExecutionSummary -> Bool
$c== :: ExecutionSummary -> ExecutionSummary -> Bool
Eq, Eq ExecutionSummary
ExecutionSummary -> ExecutionSummary -> Bool
ExecutionSummary -> ExecutionSummary -> Ordering
ExecutionSummary -> ExecutionSummary -> ExecutionSummary
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 :: ExecutionSummary -> ExecutionSummary -> ExecutionSummary
$cmin :: ExecutionSummary -> ExecutionSummary -> ExecutionSummary
max :: ExecutionSummary -> ExecutionSummary -> ExecutionSummary
$cmax :: ExecutionSummary -> ExecutionSummary -> ExecutionSummary
>= :: ExecutionSummary -> ExecutionSummary -> Bool
$c>= :: ExecutionSummary -> ExecutionSummary -> Bool
> :: ExecutionSummary -> ExecutionSummary -> Bool
$c> :: ExecutionSummary -> ExecutionSummary -> Bool
<= :: ExecutionSummary -> ExecutionSummary -> Bool
$c<= :: ExecutionSummary -> ExecutionSummary -> Bool
< :: ExecutionSummary -> ExecutionSummary -> Bool
$c< :: ExecutionSummary -> ExecutionSummary -> Bool
compare :: ExecutionSummary -> ExecutionSummary -> Ordering
$ccompare :: ExecutionSummary -> ExecutionSummary -> Ordering
Ord, forall x. Rep ExecutionSummary x -> ExecutionSummary
forall x. ExecutionSummary -> Rep ExecutionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExecutionSummary x -> ExecutionSummary
$cfrom :: forall x. ExecutionSummary -> Rep ExecutionSummary x
Generic)
  deriving anyclass (ExecutionSummary -> ()
forall a. (a -> ()) -> NFData a
rnf :: ExecutionSummary -> ()
$crnf :: ExecutionSummary -> ()
NFData, Eq ExecutionSummary
Int -> ExecutionSummary -> Int
ExecutionSummary -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: ExecutionSummary -> Int
$chash :: ExecutionSummary -> Int
hashWithSalt :: Int -> ExecutionSummary -> Int
$chashWithSalt :: Int -> ExecutionSummary -> Int
Hashable)
  deriving forall ann. [ExecutionSummary] -> Doc ann
forall ann. ExecutionSummary -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [ExecutionSummary] -> Doc ann
$cprettyList :: forall ann. [ExecutionSummary] -> Doc ann
pretty :: forall ann. ExecutionSummary -> Doc ann
$cpretty :: forall ann. ExecutionSummary -> Doc ann
Pretty via (ViaJSON ExecutionSummary)

instance Aeson.ToJSON ExecutionSummary where
  toJSON :: ExecutionSummary -> Value
toJSON (ExecutionSummary UInt
arg0 Maybe Bool
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
$  [[Key
"executionOrder" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Aeson..= UInt
arg0]
    ,String
"success" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg1]

instance Aeson.FromJSON ExecutionSummary where
  parseJSON :: Value -> Parser ExecutionSummary
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"ExecutionSummary" forall a b. (a -> b) -> a -> b
$ \Object
arg -> UInt -> Maybe Bool -> ExecutionSummary
ExecutionSummary forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"executionOrder" 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
"success"