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