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