{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
module Language.LSP.Protocol.Internal.Types.WorkspaceFullDocumentDiagnosticReport 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.Internal.Types.Diagnostic
import qualified Language.LSP.Protocol.Types.Common
import qualified Language.LSP.Protocol.Types.Singletons
import qualified Language.LSP.Protocol.Types.Uri
data WorkspaceFullDocumentDiagnosticReport = WorkspaceFullDocumentDiagnosticReport
{
WorkspaceFullDocumentDiagnosticReport -> AString "full"
_kind :: (Language.LSP.Protocol.Types.Singletons.AString "full")
,
WorkspaceFullDocumentDiagnosticReport -> Maybe Text
_resultId :: (Maybe Data.Text.Text)
,
WorkspaceFullDocumentDiagnosticReport -> [Diagnostic]
_items :: [Language.LSP.Protocol.Internal.Types.Diagnostic.Diagnostic]
,
WorkspaceFullDocumentDiagnosticReport -> Uri
_uri :: Language.LSP.Protocol.Types.Uri.Uri
,
WorkspaceFullDocumentDiagnosticReport -> Int32 |? Null
_version :: (Language.LSP.Protocol.Types.Common.Int32 Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)
}
deriving stock (Int -> WorkspaceFullDocumentDiagnosticReport -> ShowS
[WorkspaceFullDocumentDiagnosticReport] -> ShowS
WorkspaceFullDocumentDiagnosticReport -> String
(Int -> WorkspaceFullDocumentDiagnosticReport -> ShowS)
-> (WorkspaceFullDocumentDiagnosticReport -> String)
-> ([WorkspaceFullDocumentDiagnosticReport] -> ShowS)
-> Show WorkspaceFullDocumentDiagnosticReport
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WorkspaceFullDocumentDiagnosticReport -> ShowS
showsPrec :: Int -> WorkspaceFullDocumentDiagnosticReport -> ShowS
$cshow :: WorkspaceFullDocumentDiagnosticReport -> String
show :: WorkspaceFullDocumentDiagnosticReport -> String
$cshowList :: [WorkspaceFullDocumentDiagnosticReport] -> ShowS
showList :: [WorkspaceFullDocumentDiagnosticReport] -> ShowS
Show, WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool
(WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool)
-> (WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool)
-> Eq WorkspaceFullDocumentDiagnosticReport
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool
== :: WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool
$c/= :: WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool
/= :: WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool
Eq, Eq WorkspaceFullDocumentDiagnosticReport
Eq WorkspaceFullDocumentDiagnosticReport =>
(WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Ordering)
-> (WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool)
-> (WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool)
-> (WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool)
-> (WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool)
-> (WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport)
-> (WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport)
-> Ord WorkspaceFullDocumentDiagnosticReport
WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool
WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Ordering
WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport
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 :: WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Ordering
compare :: WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Ordering
$c< :: WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool
< :: WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool
$c<= :: WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool
<= :: WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool
$c> :: WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool
> :: WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool
$c>= :: WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool
>= :: WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport -> Bool
$cmax :: WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport
max :: WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport
$cmin :: WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport
min :: WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport
-> WorkspaceFullDocumentDiagnosticReport
Ord, (forall x.
WorkspaceFullDocumentDiagnosticReport
-> Rep WorkspaceFullDocumentDiagnosticReport x)
-> (forall x.
Rep WorkspaceFullDocumentDiagnosticReport x
-> WorkspaceFullDocumentDiagnosticReport)
-> Generic WorkspaceFullDocumentDiagnosticReport
forall x.
Rep WorkspaceFullDocumentDiagnosticReport x
-> WorkspaceFullDocumentDiagnosticReport
forall x.
WorkspaceFullDocumentDiagnosticReport
-> Rep WorkspaceFullDocumentDiagnosticReport x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
WorkspaceFullDocumentDiagnosticReport
-> Rep WorkspaceFullDocumentDiagnosticReport x
from :: forall x.
WorkspaceFullDocumentDiagnosticReport
-> Rep WorkspaceFullDocumentDiagnosticReport x
$cto :: forall x.
Rep WorkspaceFullDocumentDiagnosticReport x
-> WorkspaceFullDocumentDiagnosticReport
to :: forall x.
Rep WorkspaceFullDocumentDiagnosticReport x
-> WorkspaceFullDocumentDiagnosticReport
Generic)
deriving anyclass (WorkspaceFullDocumentDiagnosticReport -> ()
(WorkspaceFullDocumentDiagnosticReport -> ())
-> NFData WorkspaceFullDocumentDiagnosticReport
forall a. (a -> ()) -> NFData a
$crnf :: WorkspaceFullDocumentDiagnosticReport -> ()
rnf :: WorkspaceFullDocumentDiagnosticReport -> ()
NFData, Eq WorkspaceFullDocumentDiagnosticReport
Eq WorkspaceFullDocumentDiagnosticReport =>
(Int -> WorkspaceFullDocumentDiagnosticReport -> Int)
-> (WorkspaceFullDocumentDiagnosticReport -> Int)
-> Hashable WorkspaceFullDocumentDiagnosticReport
Int -> WorkspaceFullDocumentDiagnosticReport -> Int
WorkspaceFullDocumentDiagnosticReport -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> WorkspaceFullDocumentDiagnosticReport -> Int
hashWithSalt :: Int -> WorkspaceFullDocumentDiagnosticReport -> Int
$chash :: WorkspaceFullDocumentDiagnosticReport -> Int
hash :: WorkspaceFullDocumentDiagnosticReport -> Int
Hashable)
deriving (forall ann. WorkspaceFullDocumentDiagnosticReport -> Doc ann)
-> (forall ann. [WorkspaceFullDocumentDiagnosticReport] -> Doc ann)
-> Pretty WorkspaceFullDocumentDiagnosticReport
forall ann. [WorkspaceFullDocumentDiagnosticReport] -> Doc ann
forall ann. WorkspaceFullDocumentDiagnosticReport -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. WorkspaceFullDocumentDiagnosticReport -> Doc ann
pretty :: forall ann. WorkspaceFullDocumentDiagnosticReport -> Doc ann
$cprettyList :: forall ann. [WorkspaceFullDocumentDiagnosticReport] -> Doc ann
prettyList :: forall ann. [WorkspaceFullDocumentDiagnosticReport] -> Doc ann
Pretty via (ViaJSON WorkspaceFullDocumentDiagnosticReport)
instance Aeson.ToJSON WorkspaceFullDocumentDiagnosticReport where
toJSON :: WorkspaceFullDocumentDiagnosticReport -> Value
toJSON (WorkspaceFullDocumentDiagnosticReport AString "full"
arg0 Maybe Text
arg1 [Diagnostic]
arg2 Uri
arg3 Int32 |? Null
arg4) = [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
"kind" Key -> AString "full" -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= AString "full"
arg0]
,String
"resultId" String -> Maybe Text -> [Pair]
forall e kv v.
(KeyValue e kv, ToJSON v) =>
String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Text
arg1
,[Key
"items" Key -> [Diagnostic] -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [Diagnostic]
arg2]
,[Key
"uri" Key -> Uri -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= Uri
arg3]
,[Key
"version" Key -> (Int32 |? Null) -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= Int32 |? Null
arg4]]
instance Aeson.FromJSON WorkspaceFullDocumentDiagnosticReport where
parseJSON :: Value -> Parser WorkspaceFullDocumentDiagnosticReport
parseJSON = String
-> (Object -> Parser WorkspaceFullDocumentDiagnosticReport)
-> Value
-> Parser WorkspaceFullDocumentDiagnosticReport
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"WorkspaceFullDocumentDiagnosticReport" ((Object -> Parser WorkspaceFullDocumentDiagnosticReport)
-> Value -> Parser WorkspaceFullDocumentDiagnosticReport)
-> (Object -> Parser WorkspaceFullDocumentDiagnosticReport)
-> Value
-> Parser WorkspaceFullDocumentDiagnosticReport
forall a b. (a -> b) -> a -> b
$ \Object
arg -> AString "full"
-> Maybe Text
-> [Diagnostic]
-> Uri
-> (Int32 |? Null)
-> WorkspaceFullDocumentDiagnosticReport
WorkspaceFullDocumentDiagnosticReport (AString "full"
-> Maybe Text
-> [Diagnostic]
-> Uri
-> (Int32 |? Null)
-> WorkspaceFullDocumentDiagnosticReport)
-> Parser (AString "full")
-> Parser
(Maybe Text
-> [Diagnostic]
-> Uri
-> (Int32 |? Null)
-> WorkspaceFullDocumentDiagnosticReport)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg Object -> Key -> Parser (AString "full")
forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"kind" Parser
(Maybe Text
-> [Diagnostic]
-> Uri
-> (Int32 |? Null)
-> WorkspaceFullDocumentDiagnosticReport)
-> Parser (Maybe Text)
-> Parser
([Diagnostic]
-> Uri -> (Int32 |? Null) -> WorkspaceFullDocumentDiagnosticReport)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
arg Object -> Key -> Parser (Maybe Text)
forall v. FromJSON v => Object -> Key -> Parser (Maybe v)
Language.LSP.Protocol.Types.Common..:!? Key
"resultId" Parser
([Diagnostic]
-> Uri -> (Int32 |? Null) -> WorkspaceFullDocumentDiagnosticReport)
-> Parser [Diagnostic]
-> Parser
(Uri -> (Int32 |? Null) -> WorkspaceFullDocumentDiagnosticReport)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
arg Object -> Key -> Parser [Diagnostic]
forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"items" Parser
(Uri -> (Int32 |? Null) -> WorkspaceFullDocumentDiagnosticReport)
-> Parser Uri
-> Parser
((Int32 |? Null) -> WorkspaceFullDocumentDiagnosticReport)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
arg Object -> Key -> Parser Uri
forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"uri" Parser ((Int32 |? Null) -> WorkspaceFullDocumentDiagnosticReport)
-> Parser (Int32 |? Null)
-> Parser WorkspaceFullDocumentDiagnosticReport
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
arg Object -> Key -> Parser (Int32 |? Null)
forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"version"