{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
module Language.LSP.Protocol.Internal.Types.TypeHierarchyRegistrationOptions 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.DocumentSelector
import qualified Language.LSP.Protocol.Types.Common
data TypeHierarchyRegistrationOptions = TypeHierarchyRegistrationOptions
{
TypeHierarchyRegistrationOptions -> DocumentSelector |? Null
_documentSelector :: (Language.LSP.Protocol.Internal.Types.DocumentSelector.DocumentSelector Language.LSP.Protocol.Types.Common.|? Language.LSP.Protocol.Types.Common.Null)
,
TypeHierarchyRegistrationOptions -> Maybe Bool
_workDoneProgress :: (Maybe Bool)
,
TypeHierarchyRegistrationOptions -> Maybe Text
_id :: (Maybe Data.Text.Text)
}
deriving stock (Int -> TypeHierarchyRegistrationOptions -> ShowS
[TypeHierarchyRegistrationOptions] -> ShowS
TypeHierarchyRegistrationOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TypeHierarchyRegistrationOptions] -> ShowS
$cshowList :: [TypeHierarchyRegistrationOptions] -> ShowS
show :: TypeHierarchyRegistrationOptions -> String
$cshow :: TypeHierarchyRegistrationOptions -> String
showsPrec :: Int -> TypeHierarchyRegistrationOptions -> ShowS
$cshowsPrec :: Int -> TypeHierarchyRegistrationOptions -> ShowS
Show, TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions -> Bool
$c/= :: TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions -> Bool
== :: TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions -> Bool
$c== :: TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions -> Bool
Eq, Eq TypeHierarchyRegistrationOptions
TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions -> Bool
TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions -> Ordering
TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions
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 :: TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions
$cmin :: TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions
max :: TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions
$cmax :: TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions
>= :: TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions -> Bool
$c>= :: TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions -> Bool
> :: TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions -> Bool
$c> :: TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions -> Bool
<= :: TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions -> Bool
$c<= :: TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions -> Bool
< :: TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions -> Bool
$c< :: TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions -> Bool
compare :: TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions -> Ordering
$ccompare :: TypeHierarchyRegistrationOptions
-> TypeHierarchyRegistrationOptions -> Ordering
Ord, forall x.
Rep TypeHierarchyRegistrationOptions x
-> TypeHierarchyRegistrationOptions
forall x.
TypeHierarchyRegistrationOptions
-> Rep TypeHierarchyRegistrationOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TypeHierarchyRegistrationOptions x
-> TypeHierarchyRegistrationOptions
$cfrom :: forall x.
TypeHierarchyRegistrationOptions
-> Rep TypeHierarchyRegistrationOptions x
Generic)
deriving anyclass (TypeHierarchyRegistrationOptions -> ()
forall a. (a -> ()) -> NFData a
rnf :: TypeHierarchyRegistrationOptions -> ()
$crnf :: TypeHierarchyRegistrationOptions -> ()
NFData, Eq TypeHierarchyRegistrationOptions
Int -> TypeHierarchyRegistrationOptions -> Int
TypeHierarchyRegistrationOptions -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: TypeHierarchyRegistrationOptions -> Int
$chash :: TypeHierarchyRegistrationOptions -> Int
hashWithSalt :: Int -> TypeHierarchyRegistrationOptions -> Int
$chashWithSalt :: Int -> TypeHierarchyRegistrationOptions -> Int
Hashable)
deriving forall ann. [TypeHierarchyRegistrationOptions] -> Doc ann
forall ann. TypeHierarchyRegistrationOptions -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [TypeHierarchyRegistrationOptions] -> Doc ann
$cprettyList :: forall ann. [TypeHierarchyRegistrationOptions] -> Doc ann
pretty :: forall ann. TypeHierarchyRegistrationOptions -> Doc ann
$cpretty :: forall ann. TypeHierarchyRegistrationOptions -> Doc ann
Pretty via (ViaJSON TypeHierarchyRegistrationOptions)
instance Aeson.ToJSON TypeHierarchyRegistrationOptions where
toJSON :: TypeHierarchyRegistrationOptions -> Value
toJSON (TypeHierarchyRegistrationOptions DocumentSelector |? Null
arg0 Maybe Bool
arg1 Maybe Text
arg2) = [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
"documentSelector" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Aeson..= DocumentSelector |? Null
arg0]
,String
"workDoneProgress" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg1
,String
"id" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Text
arg2]
instance Aeson.FromJSON TypeHierarchyRegistrationOptions where
parseJSON :: Value -> Parser TypeHierarchyRegistrationOptions
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"TypeHierarchyRegistrationOptions" forall a b. (a -> b) -> a -> b
$ \Object
arg -> (DocumentSelector |? Null)
-> Maybe Bool -> Maybe Text -> TypeHierarchyRegistrationOptions
TypeHierarchyRegistrationOptions forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"documentSelector" 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
"workDoneProgress" 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
"id"