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

{-|
How a completion was triggered
-}
data CompletionTriggerKind = 
    {-|
  Completion was triggered by typing an identifier (24x7 code
  complete), manual invocation (e.g Ctrl+Space) or via API.
  -}
  CompletionTriggerKind_Invoked
  | {-|
  Completion was triggered by a trigger character specified by
  the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
  -}
  CompletionTriggerKind_TriggerCharacter
  | {-|
  Completion was re-triggered as current completion list is incomplete
  -}
  CompletionTriggerKind_TriggerForIncompleteCompletions
  deriving stock (Int -> CompletionTriggerKind -> ShowS
[CompletionTriggerKind] -> ShowS
CompletionTriggerKind -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CompletionTriggerKind] -> ShowS
$cshowList :: [CompletionTriggerKind] -> ShowS
show :: CompletionTriggerKind -> String
$cshow :: CompletionTriggerKind -> String
showsPrec :: Int -> CompletionTriggerKind -> ShowS
$cshowsPrec :: Int -> CompletionTriggerKind -> ShowS
Show, CompletionTriggerKind -> CompletionTriggerKind -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CompletionTriggerKind -> CompletionTriggerKind -> Bool
$c/= :: CompletionTriggerKind -> CompletionTriggerKind -> Bool
== :: CompletionTriggerKind -> CompletionTriggerKind -> Bool
$c== :: CompletionTriggerKind -> CompletionTriggerKind -> Bool
Eq, Eq CompletionTriggerKind
CompletionTriggerKind -> CompletionTriggerKind -> Bool
CompletionTriggerKind -> CompletionTriggerKind -> Ordering
CompletionTriggerKind
-> CompletionTriggerKind -> CompletionTriggerKind
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 :: CompletionTriggerKind
-> CompletionTriggerKind -> CompletionTriggerKind
$cmin :: CompletionTriggerKind
-> CompletionTriggerKind -> CompletionTriggerKind
max :: CompletionTriggerKind
-> CompletionTriggerKind -> CompletionTriggerKind
$cmax :: CompletionTriggerKind
-> CompletionTriggerKind -> CompletionTriggerKind
>= :: CompletionTriggerKind -> CompletionTriggerKind -> Bool
$c>= :: CompletionTriggerKind -> CompletionTriggerKind -> Bool
> :: CompletionTriggerKind -> CompletionTriggerKind -> Bool
$c> :: CompletionTriggerKind -> CompletionTriggerKind -> Bool
<= :: CompletionTriggerKind -> CompletionTriggerKind -> Bool
$c<= :: CompletionTriggerKind -> CompletionTriggerKind -> Bool
< :: CompletionTriggerKind -> CompletionTriggerKind -> Bool
$c< :: CompletionTriggerKind -> CompletionTriggerKind -> Bool
compare :: CompletionTriggerKind -> CompletionTriggerKind -> Ordering
$ccompare :: CompletionTriggerKind -> CompletionTriggerKind -> Ordering
Ord, forall x. Rep CompletionTriggerKind x -> CompletionTriggerKind
forall x. CompletionTriggerKind -> Rep CompletionTriggerKind x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CompletionTriggerKind x -> CompletionTriggerKind
$cfrom :: forall x. CompletionTriggerKind -> Rep CompletionTriggerKind x
Generic)
  deriving anyclass (CompletionTriggerKind -> ()
forall a. (a -> ()) -> NFData a
rnf :: CompletionTriggerKind -> ()
$crnf :: CompletionTriggerKind -> ()
NFData, Eq CompletionTriggerKind
Int -> CompletionTriggerKind -> Int
CompletionTriggerKind -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: CompletionTriggerKind -> Int
$chash :: CompletionTriggerKind -> Int
hashWithSalt :: Int -> CompletionTriggerKind -> Int
$chashWithSalt :: Int -> CompletionTriggerKind -> Int
Hashable)
  deriving ( [CompletionTriggerKind] -> Encoding
[CompletionTriggerKind] -> Value
CompletionTriggerKind -> Encoding
CompletionTriggerKind -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [CompletionTriggerKind] -> Encoding
$ctoEncodingList :: [CompletionTriggerKind] -> Encoding
toJSONList :: [CompletionTriggerKind] -> Value
$ctoJSONList :: [CompletionTriggerKind] -> Value
toEncoding :: CompletionTriggerKind -> Encoding
$ctoEncoding :: CompletionTriggerKind -> Encoding
toJSON :: CompletionTriggerKind -> Value
$ctoJSON :: CompletionTriggerKind -> Value
Aeson.ToJSON
  , Value -> Parser [CompletionTriggerKind]
Value -> Parser CompletionTriggerKind
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [CompletionTriggerKind]
$cparseJSONList :: Value -> Parser [CompletionTriggerKind]
parseJSON :: Value -> Parser CompletionTriggerKind
$cparseJSON :: Value -> Parser CompletionTriggerKind
Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum CompletionTriggerKind Language.LSP.Protocol.Types.Common.UInt)
  deriving forall ann. [CompletionTriggerKind] -> Doc ann
forall ann. CompletionTriggerKind -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [CompletionTriggerKind] -> Doc ann
$cprettyList :: forall ann. [CompletionTriggerKind] -> Doc ann
pretty :: forall ann. CompletionTriggerKind -> Doc ann
$cpretty :: forall ann. CompletionTriggerKind -> Doc ann
Pretty via (ViaJSON CompletionTriggerKind)

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