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

{-|
A diagnostic report indicating that the last returned
report is still accurate.

@since 3.17.0
-}
data UnchangedDocumentDiagnosticReport = UnchangedDocumentDiagnosticReport 
  { {-|
  A document diagnostic report indicating
  no changes to the last result. A server can
  only return `unchanged` if result ids are
  provided.
  -}
  UnchangedDocumentDiagnosticReport -> AString "unchanged"
_kind :: (Language.LSP.Protocol.Types.Singletons.AString "unchanged")
  , {-|
  A result id which will be sent on the next
  diagnostic request for the same document.
  -}
  UnchangedDocumentDiagnosticReport -> Text
_resultId :: Data.Text.Text
  }
  deriving stock (Int -> UnchangedDocumentDiagnosticReport -> ShowS
[UnchangedDocumentDiagnosticReport] -> ShowS
UnchangedDocumentDiagnosticReport -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnchangedDocumentDiagnosticReport] -> ShowS
$cshowList :: [UnchangedDocumentDiagnosticReport] -> ShowS
show :: UnchangedDocumentDiagnosticReport -> String
$cshow :: UnchangedDocumentDiagnosticReport -> String
showsPrec :: Int -> UnchangedDocumentDiagnosticReport -> ShowS
$cshowsPrec :: Int -> UnchangedDocumentDiagnosticReport -> ShowS
Show, UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport -> Bool
$c/= :: UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport -> Bool
== :: UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport -> Bool
$c== :: UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport -> Bool
Eq, Eq UnchangedDocumentDiagnosticReport
UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport -> Bool
UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport -> Ordering
UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport
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 :: UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport
$cmin :: UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport
max :: UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport
$cmax :: UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport
>= :: UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport -> Bool
$c>= :: UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport -> Bool
> :: UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport -> Bool
$c> :: UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport -> Bool
<= :: UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport -> Bool
$c<= :: UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport -> Bool
< :: UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport -> Bool
$c< :: UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport -> Bool
compare :: UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport -> Ordering
$ccompare :: UnchangedDocumentDiagnosticReport
-> UnchangedDocumentDiagnosticReport -> Ordering
Ord, forall x.
Rep UnchangedDocumentDiagnosticReport x
-> UnchangedDocumentDiagnosticReport
forall x.
UnchangedDocumentDiagnosticReport
-> Rep UnchangedDocumentDiagnosticReport x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UnchangedDocumentDiagnosticReport x
-> UnchangedDocumentDiagnosticReport
$cfrom :: forall x.
UnchangedDocumentDiagnosticReport
-> Rep UnchangedDocumentDiagnosticReport x
Generic)
  deriving anyclass (UnchangedDocumentDiagnosticReport -> ()
forall a. (a -> ()) -> NFData a
rnf :: UnchangedDocumentDiagnosticReport -> ()
$crnf :: UnchangedDocumentDiagnosticReport -> ()
NFData, Eq UnchangedDocumentDiagnosticReport
Int -> UnchangedDocumentDiagnosticReport -> Int
UnchangedDocumentDiagnosticReport -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: UnchangedDocumentDiagnosticReport -> Int
$chash :: UnchangedDocumentDiagnosticReport -> Int
hashWithSalt :: Int -> UnchangedDocumentDiagnosticReport -> Int
$chashWithSalt :: Int -> UnchangedDocumentDiagnosticReport -> Int
Hashable)
  deriving forall ann. [UnchangedDocumentDiagnosticReport] -> Doc ann
forall ann. UnchangedDocumentDiagnosticReport -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [UnchangedDocumentDiagnosticReport] -> Doc ann
$cprettyList :: forall ann. [UnchangedDocumentDiagnosticReport] -> Doc ann
pretty :: forall ann. UnchangedDocumentDiagnosticReport -> Doc ann
$cpretty :: forall ann. UnchangedDocumentDiagnosticReport -> Doc ann
Pretty via (ViaJSON UnchangedDocumentDiagnosticReport)

instance Aeson.ToJSON UnchangedDocumentDiagnosticReport where
  toJSON :: UnchangedDocumentDiagnosticReport -> Value
toJSON (UnchangedDocumentDiagnosticReport AString "unchanged"
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
$  [[Key
"kind" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Aeson..= AString "unchanged"
arg0]
    ,[Key
"resultId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Aeson..= Text
arg1]]

instance Aeson.FromJSON UnchangedDocumentDiagnosticReport where
  parseJSON :: Value -> Parser UnchangedDocumentDiagnosticReport
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"UnchangedDocumentDiagnosticReport" forall a b. (a -> b) -> a -> b
$ \Object
arg -> AString "unchanged" -> Text -> UnchangedDocumentDiagnosticReport
UnchangedDocumentDiagnosticReport 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 a
Aeson..: Key
"resultId"