{- 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.WorkDoneProgressEnd 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
import qualified Language.LSP.Protocol.Types.Singletons

{-|

-}
data WorkDoneProgressEnd = WorkDoneProgressEnd 
  { {-|

  -}
  WorkDoneProgressEnd -> AString "end"
_kind :: (Language.LSP.Protocol.Types.Singletons.AString "end")
  , {-|
  Optional, a final message indicating to for example indicate the outcome
  of the operation.
  -}
  WorkDoneProgressEnd -> Maybe Text
_message :: (Maybe Data.Text.Text)
  }
  deriving stock (Int -> WorkDoneProgressEnd -> ShowS
[WorkDoneProgressEnd] -> ShowS
WorkDoneProgressEnd -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkDoneProgressEnd] -> ShowS
$cshowList :: [WorkDoneProgressEnd] -> ShowS
show :: WorkDoneProgressEnd -> String
$cshow :: WorkDoneProgressEnd -> String
showsPrec :: Int -> WorkDoneProgressEnd -> ShowS
$cshowsPrec :: Int -> WorkDoneProgressEnd -> ShowS
Show, WorkDoneProgressEnd -> WorkDoneProgressEnd -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkDoneProgressEnd -> WorkDoneProgressEnd -> Bool
$c/= :: WorkDoneProgressEnd -> WorkDoneProgressEnd -> Bool
== :: WorkDoneProgressEnd -> WorkDoneProgressEnd -> Bool
$c== :: WorkDoneProgressEnd -> WorkDoneProgressEnd -> Bool
Eq, Eq WorkDoneProgressEnd
WorkDoneProgressEnd -> WorkDoneProgressEnd -> Bool
WorkDoneProgressEnd -> WorkDoneProgressEnd -> Ordering
WorkDoneProgressEnd -> WorkDoneProgressEnd -> WorkDoneProgressEnd
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 :: WorkDoneProgressEnd -> WorkDoneProgressEnd -> WorkDoneProgressEnd
$cmin :: WorkDoneProgressEnd -> WorkDoneProgressEnd -> WorkDoneProgressEnd
max :: WorkDoneProgressEnd -> WorkDoneProgressEnd -> WorkDoneProgressEnd
$cmax :: WorkDoneProgressEnd -> WorkDoneProgressEnd -> WorkDoneProgressEnd
>= :: WorkDoneProgressEnd -> WorkDoneProgressEnd -> Bool
$c>= :: WorkDoneProgressEnd -> WorkDoneProgressEnd -> Bool
> :: WorkDoneProgressEnd -> WorkDoneProgressEnd -> Bool
$c> :: WorkDoneProgressEnd -> WorkDoneProgressEnd -> Bool
<= :: WorkDoneProgressEnd -> WorkDoneProgressEnd -> Bool
$c<= :: WorkDoneProgressEnd -> WorkDoneProgressEnd -> Bool
< :: WorkDoneProgressEnd -> WorkDoneProgressEnd -> Bool
$c< :: WorkDoneProgressEnd -> WorkDoneProgressEnd -> Bool
compare :: WorkDoneProgressEnd -> WorkDoneProgressEnd -> Ordering
$ccompare :: WorkDoneProgressEnd -> WorkDoneProgressEnd -> Ordering
Ord, forall x. Rep WorkDoneProgressEnd x -> WorkDoneProgressEnd
forall x. WorkDoneProgressEnd -> Rep WorkDoneProgressEnd x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WorkDoneProgressEnd x -> WorkDoneProgressEnd
$cfrom :: forall x. WorkDoneProgressEnd -> Rep WorkDoneProgressEnd x
Generic)
  deriving anyclass (WorkDoneProgressEnd -> ()
forall a. (a -> ()) -> NFData a
rnf :: WorkDoneProgressEnd -> ()
$crnf :: WorkDoneProgressEnd -> ()
NFData, Eq WorkDoneProgressEnd
Int -> WorkDoneProgressEnd -> Int
WorkDoneProgressEnd -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: WorkDoneProgressEnd -> Int
$chash :: WorkDoneProgressEnd -> Int
hashWithSalt :: Int -> WorkDoneProgressEnd -> Int
$chashWithSalt :: Int -> WorkDoneProgressEnd -> Int
Hashable)
  deriving forall ann. [WorkDoneProgressEnd] -> Doc ann
forall ann. WorkDoneProgressEnd -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [WorkDoneProgressEnd] -> Doc ann
$cprettyList :: forall ann. [WorkDoneProgressEnd] -> Doc ann
pretty :: forall ann. WorkDoneProgressEnd -> Doc ann
$cpretty :: forall ann. WorkDoneProgressEnd -> Doc ann
Pretty via (ViaJSON WorkDoneProgressEnd)

instance Aeson.ToJSON WorkDoneProgressEnd where
  toJSON :: WorkDoneProgressEnd -> Value
toJSON (WorkDoneProgressEnd AString "end"
arg0 Maybe 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
$  [[Key
"kind" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Aeson..= AString "end"
arg0]
    ,String
"message" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Text
arg1]

instance Aeson.FromJSON WorkDoneProgressEnd where
  parseJSON :: Value -> Parser WorkDoneProgressEnd
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"WorkDoneProgressEnd" forall a b. (a -> b) -> a -> b
$ \Object
arg -> AString "end" -> Maybe Text -> WorkDoneProgressEnd
WorkDoneProgressEnd forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"kind" 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
"message"