{- 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.WatchKind 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.Set
import qualified Data.String
import qualified Language.LSP.Protocol.Types.Common
import qualified Language.LSP.Protocol.Types.LspEnum

{-|

-}
data WatchKind = 
    {-|
  Interested in create events.
  -}
  WatchKind_Create
  | {-|
  Interested in change events
  -}
  WatchKind_Change
  | {-|
  Interested in delete events
  -}
  WatchKind_Delete
  | WatchKind_Custom Language.LSP.Protocol.Types.Common.UInt
  deriving stock (Int -> WatchKind -> ShowS
[WatchKind] -> ShowS
WatchKind -> String
(Int -> WatchKind -> ShowS)
-> (WatchKind -> String)
-> ([WatchKind] -> ShowS)
-> Show WatchKind
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WatchKind -> ShowS
showsPrec :: Int -> WatchKind -> ShowS
$cshow :: WatchKind -> String
show :: WatchKind -> String
$cshowList :: [WatchKind] -> ShowS
showList :: [WatchKind] -> ShowS
Show, WatchKind -> WatchKind -> Bool
(WatchKind -> WatchKind -> Bool)
-> (WatchKind -> WatchKind -> Bool) -> Eq WatchKind
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WatchKind -> WatchKind -> Bool
== :: WatchKind -> WatchKind -> Bool
$c/= :: WatchKind -> WatchKind -> Bool
/= :: WatchKind -> WatchKind -> Bool
Eq, Eq WatchKind
Eq WatchKind =>
(WatchKind -> WatchKind -> Ordering)
-> (WatchKind -> WatchKind -> Bool)
-> (WatchKind -> WatchKind -> Bool)
-> (WatchKind -> WatchKind -> Bool)
-> (WatchKind -> WatchKind -> Bool)
-> (WatchKind -> WatchKind -> WatchKind)
-> (WatchKind -> WatchKind -> WatchKind)
-> Ord WatchKind
WatchKind -> WatchKind -> Bool
WatchKind -> WatchKind -> Ordering
WatchKind -> WatchKind -> WatchKind
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 :: WatchKind -> WatchKind -> Ordering
compare :: WatchKind -> WatchKind -> Ordering
$c< :: WatchKind -> WatchKind -> Bool
< :: WatchKind -> WatchKind -> Bool
$c<= :: WatchKind -> WatchKind -> Bool
<= :: WatchKind -> WatchKind -> Bool
$c> :: WatchKind -> WatchKind -> Bool
> :: WatchKind -> WatchKind -> Bool
$c>= :: WatchKind -> WatchKind -> Bool
>= :: WatchKind -> WatchKind -> Bool
$cmax :: WatchKind -> WatchKind -> WatchKind
max :: WatchKind -> WatchKind -> WatchKind
$cmin :: WatchKind -> WatchKind -> WatchKind
min :: WatchKind -> WatchKind -> WatchKind
Ord, (forall x. WatchKind -> Rep WatchKind x)
-> (forall x. Rep WatchKind x -> WatchKind) -> Generic WatchKind
forall x. Rep WatchKind x -> WatchKind
forall x. WatchKind -> Rep WatchKind x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. WatchKind -> Rep WatchKind x
from :: forall x. WatchKind -> Rep WatchKind x
$cto :: forall x. Rep WatchKind x -> WatchKind
to :: forall x. Rep WatchKind x -> WatchKind
Generic)
  deriving anyclass (WatchKind -> ()
(WatchKind -> ()) -> NFData WatchKind
forall a. (a -> ()) -> NFData a
$crnf :: WatchKind -> ()
rnf :: WatchKind -> ()
NFData, Eq WatchKind
Eq WatchKind =>
(Int -> WatchKind -> Int)
-> (WatchKind -> Int) -> Hashable WatchKind
Int -> WatchKind -> Int
WatchKind -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> WatchKind -> Int
hashWithSalt :: Int -> WatchKind -> Int
$chash :: WatchKind -> Int
hash :: WatchKind -> Int
Hashable)
  deriving ( [WatchKind] -> Value
[WatchKind] -> Encoding
WatchKind -> Bool
WatchKind -> Value
WatchKind -> Encoding
(WatchKind -> Value)
-> (WatchKind -> Encoding)
-> ([WatchKind] -> Value)
-> ([WatchKind] -> Encoding)
-> (WatchKind -> Bool)
-> ToJSON WatchKind
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> (a -> Bool)
-> ToJSON a
$ctoJSON :: WatchKind -> Value
toJSON :: WatchKind -> Value
$ctoEncoding :: WatchKind -> Encoding
toEncoding :: WatchKind -> Encoding
$ctoJSONList :: [WatchKind] -> Value
toJSONList :: [WatchKind] -> Value
$ctoEncodingList :: [WatchKind] -> Encoding
toEncodingList :: [WatchKind] -> Encoding
$comitField :: WatchKind -> Bool
omitField :: WatchKind -> Bool
Aeson.ToJSON
  , Maybe WatchKind
Value -> Parser [WatchKind]
Value -> Parser WatchKind
(Value -> Parser WatchKind)
-> (Value -> Parser [WatchKind])
-> Maybe WatchKind
-> FromJSON WatchKind
forall a.
(Value -> Parser a)
-> (Value -> Parser [a]) -> Maybe a -> FromJSON a
$cparseJSON :: Value -> Parser WatchKind
parseJSON :: Value -> Parser WatchKind
$cparseJSONList :: Value -> Parser [WatchKind]
parseJSONList :: Value -> Parser [WatchKind]
$comittedField :: Maybe WatchKind
omittedField :: Maybe WatchKind
Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum WatchKind)
  deriving (forall ann. WatchKind -> Doc ann)
-> (forall ann. [WatchKind] -> Doc ann) -> Pretty WatchKind
forall ann. [WatchKind] -> Doc ann
forall ann. WatchKind -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. WatchKind -> Doc ann
pretty :: forall ann. WatchKind -> Doc ann
$cprettyList :: forall ann. [WatchKind] -> Doc ann
prettyList :: forall ann. [WatchKind] -> Doc ann
Pretty via (ViaJSON WatchKind)

instance Language.LSP.Protocol.Types.LspEnum.LspEnum WatchKind where
  knownValues :: Set WatchKind
knownValues = [WatchKind] -> Set WatchKind
forall a. Ord a => [a] -> Set a
Data.Set.fromList [WatchKind
WatchKind_Create
    ,WatchKind
WatchKind_Change
    ,WatchKind
WatchKind_Delete]
  type EnumBaseType WatchKind = Language.LSP.Protocol.Types.Common.UInt
  toEnumBaseType :: WatchKind -> EnumBaseType WatchKind
toEnumBaseType WatchKind
WatchKind_Create = EnumBaseType WatchKind
UInt
1
  toEnumBaseType WatchKind
WatchKind_Change = EnumBaseType WatchKind
UInt
2
  toEnumBaseType WatchKind
WatchKind_Delete = EnumBaseType WatchKind
UInt
4
  toEnumBaseType (WatchKind_Custom UInt
arg) = EnumBaseType WatchKind
UInt
arg

instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum WatchKind where
  fromOpenEnumBaseType :: EnumBaseType WatchKind -> WatchKind
fromOpenEnumBaseType EnumBaseType WatchKind
1 = WatchKind
WatchKind_Create
  fromOpenEnumBaseType EnumBaseType WatchKind
2 = WatchKind
WatchKind_Change
  fromOpenEnumBaseType EnumBaseType WatchKind
4 = WatchKind
WatchKind_Delete
  fromOpenEnumBaseType EnumBaseType WatchKind
arg = UInt -> WatchKind
WatchKind_Custom EnumBaseType WatchKind
UInt
arg