{- 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.FileChangeType 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

{-|
The file event type
-}
data FileChangeType = 
    {-|
  The file got created.
  -}
  FileChangeType_Created
  | {-|
  The file got changed.
  -}
  FileChangeType_Changed
  | {-|
  The file got deleted.
  -}
  FileChangeType_Deleted
  deriving stock (Int -> FileChangeType -> ShowS
[FileChangeType] -> ShowS
FileChangeType -> String
(Int -> FileChangeType -> ShowS)
-> (FileChangeType -> String)
-> ([FileChangeType] -> ShowS)
-> Show FileChangeType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FileChangeType -> ShowS
showsPrec :: Int -> FileChangeType -> ShowS
$cshow :: FileChangeType -> String
show :: FileChangeType -> String
$cshowList :: [FileChangeType] -> ShowS
showList :: [FileChangeType] -> ShowS
Show, FileChangeType -> FileChangeType -> Bool
(FileChangeType -> FileChangeType -> Bool)
-> (FileChangeType -> FileChangeType -> Bool) -> Eq FileChangeType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FileChangeType -> FileChangeType -> Bool
== :: FileChangeType -> FileChangeType -> Bool
$c/= :: FileChangeType -> FileChangeType -> Bool
/= :: FileChangeType -> FileChangeType -> Bool
Eq, Eq FileChangeType
Eq FileChangeType =>
(FileChangeType -> FileChangeType -> Ordering)
-> (FileChangeType -> FileChangeType -> Bool)
-> (FileChangeType -> FileChangeType -> Bool)
-> (FileChangeType -> FileChangeType -> Bool)
-> (FileChangeType -> FileChangeType -> Bool)
-> (FileChangeType -> FileChangeType -> FileChangeType)
-> (FileChangeType -> FileChangeType -> FileChangeType)
-> Ord FileChangeType
FileChangeType -> FileChangeType -> Bool
FileChangeType -> FileChangeType -> Ordering
FileChangeType -> FileChangeType -> FileChangeType
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 :: FileChangeType -> FileChangeType -> Ordering
compare :: FileChangeType -> FileChangeType -> Ordering
$c< :: FileChangeType -> FileChangeType -> Bool
< :: FileChangeType -> FileChangeType -> Bool
$c<= :: FileChangeType -> FileChangeType -> Bool
<= :: FileChangeType -> FileChangeType -> Bool
$c> :: FileChangeType -> FileChangeType -> Bool
> :: FileChangeType -> FileChangeType -> Bool
$c>= :: FileChangeType -> FileChangeType -> Bool
>= :: FileChangeType -> FileChangeType -> Bool
$cmax :: FileChangeType -> FileChangeType -> FileChangeType
max :: FileChangeType -> FileChangeType -> FileChangeType
$cmin :: FileChangeType -> FileChangeType -> FileChangeType
min :: FileChangeType -> FileChangeType -> FileChangeType
Ord, (forall x. FileChangeType -> Rep FileChangeType x)
-> (forall x. Rep FileChangeType x -> FileChangeType)
-> Generic FileChangeType
forall x. Rep FileChangeType x -> FileChangeType
forall x. FileChangeType -> Rep FileChangeType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. FileChangeType -> Rep FileChangeType x
from :: forall x. FileChangeType -> Rep FileChangeType x
$cto :: forall x. Rep FileChangeType x -> FileChangeType
to :: forall x. Rep FileChangeType x -> FileChangeType
Generic)
  deriving anyclass (FileChangeType -> ()
(FileChangeType -> ()) -> NFData FileChangeType
forall a. (a -> ()) -> NFData a
$crnf :: FileChangeType -> ()
rnf :: FileChangeType -> ()
NFData, Eq FileChangeType
Eq FileChangeType =>
(Int -> FileChangeType -> Int)
-> (FileChangeType -> Int) -> Hashable FileChangeType
Int -> FileChangeType -> Int
FileChangeType -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> FileChangeType -> Int
hashWithSalt :: Int -> FileChangeType -> Int
$chash :: FileChangeType -> Int
hash :: FileChangeType -> Int
Hashable)
  deriving ( [FileChangeType] -> Value
[FileChangeType] -> Encoding
FileChangeType -> Bool
FileChangeType -> Value
FileChangeType -> Encoding
(FileChangeType -> Value)
-> (FileChangeType -> Encoding)
-> ([FileChangeType] -> Value)
-> ([FileChangeType] -> Encoding)
-> (FileChangeType -> Bool)
-> ToJSON FileChangeType
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> (a -> Bool)
-> ToJSON a
$ctoJSON :: FileChangeType -> Value
toJSON :: FileChangeType -> Value
$ctoEncoding :: FileChangeType -> Encoding
toEncoding :: FileChangeType -> Encoding
$ctoJSONList :: [FileChangeType] -> Value
toJSONList :: [FileChangeType] -> Value
$ctoEncodingList :: [FileChangeType] -> Encoding
toEncodingList :: [FileChangeType] -> Encoding
$comitField :: FileChangeType -> Bool
omitField :: FileChangeType -> Bool
Aeson.ToJSON
  , Maybe FileChangeType
Value -> Parser [FileChangeType]
Value -> Parser FileChangeType
(Value -> Parser FileChangeType)
-> (Value -> Parser [FileChangeType])
-> Maybe FileChangeType
-> FromJSON FileChangeType
forall a.
(Value -> Parser a)
-> (Value -> Parser [a]) -> Maybe a -> FromJSON a
$cparseJSON :: Value -> Parser FileChangeType
parseJSON :: Value -> Parser FileChangeType
$cparseJSONList :: Value -> Parser [FileChangeType]
parseJSONList :: Value -> Parser [FileChangeType]
$comittedField :: Maybe FileChangeType
omittedField :: Maybe FileChangeType
Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum FileChangeType)
  deriving (forall ann. FileChangeType -> Doc ann)
-> (forall ann. [FileChangeType] -> Doc ann)
-> Pretty FileChangeType
forall ann. [FileChangeType] -> Doc ann
forall ann. FileChangeType -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. FileChangeType -> Doc ann
pretty :: forall ann. FileChangeType -> Doc ann
$cprettyList :: forall ann. [FileChangeType] -> Doc ann
prettyList :: forall ann. [FileChangeType] -> Doc ann
Pretty via (ViaJSON FileChangeType)

instance Language.LSP.Protocol.Types.LspEnum.LspEnum FileChangeType where
  knownValues :: Set FileChangeType
knownValues = [FileChangeType] -> Set FileChangeType
forall a. Ord a => [a] -> Set a
Data.Set.fromList [FileChangeType
FileChangeType_Created
    ,FileChangeType
FileChangeType_Changed
    ,FileChangeType
FileChangeType_Deleted]
  type EnumBaseType FileChangeType = Language.LSP.Protocol.Types.Common.UInt
  toEnumBaseType :: FileChangeType -> EnumBaseType FileChangeType
toEnumBaseType FileChangeType
FileChangeType_Created = EnumBaseType FileChangeType
UInt
1
  toEnumBaseType FileChangeType
FileChangeType_Changed = EnumBaseType FileChangeType
UInt
2
  toEnumBaseType FileChangeType
FileChangeType_Deleted = EnumBaseType FileChangeType
UInt
3
  fromEnumBaseType :: EnumBaseType FileChangeType -> Maybe FileChangeType
fromEnumBaseType EnumBaseType FileChangeType
1 = FileChangeType -> Maybe FileChangeType
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure FileChangeType
FileChangeType_Created
  fromEnumBaseType EnumBaseType FileChangeType
2 = FileChangeType -> Maybe FileChangeType
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure FileChangeType
FileChangeType_Changed
  fromEnumBaseType EnumBaseType FileChangeType
3 = FileChangeType -> Maybe FileChangeType
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure FileChangeType
FileChangeType_Deleted
  fromEnumBaseType EnumBaseType FileChangeType
_ = Maybe FileChangeType
forall a. Maybe a
Nothing