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

instance Language.LSP.Protocol.Types.LspEnum.LspEnum WatchKind where
  knownValues :: Set WatchKind
knownValues = 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 = UInt
1
  toEnumBaseType WatchKind
WatchKind_Change = UInt
2
  toEnumBaseType WatchKind
WatchKind_Delete = UInt
4
  toEnumBaseType (WatchKind_Custom UInt
arg) = 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
arg