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