{- 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.FileOperationRegistrationOptions 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.Internal.Types.FileOperationFilter
import qualified Language.LSP.Protocol.Types.Common

{-|
The options to register for file operations.

@since 3.16.0
-}
data FileOperationRegistrationOptions = FileOperationRegistrationOptions 
  { {-|
  The actual filters.
  -}
  FileOperationRegistrationOptions -> [FileOperationFilter]
_filters :: [Language.LSP.Protocol.Internal.Types.FileOperationFilter.FileOperationFilter]
  }
  deriving stock (Int -> FileOperationRegistrationOptions -> ShowS
[FileOperationRegistrationOptions] -> ShowS
FileOperationRegistrationOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FileOperationRegistrationOptions] -> ShowS
$cshowList :: [FileOperationRegistrationOptions] -> ShowS
show :: FileOperationRegistrationOptions -> String
$cshow :: FileOperationRegistrationOptions -> String
showsPrec :: Int -> FileOperationRegistrationOptions -> ShowS
$cshowsPrec :: Int -> FileOperationRegistrationOptions -> ShowS
Show, FileOperationRegistrationOptions
-> FileOperationRegistrationOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileOperationRegistrationOptions
-> FileOperationRegistrationOptions -> Bool
$c/= :: FileOperationRegistrationOptions
-> FileOperationRegistrationOptions -> Bool
== :: FileOperationRegistrationOptions
-> FileOperationRegistrationOptions -> Bool
$c== :: FileOperationRegistrationOptions
-> FileOperationRegistrationOptions -> Bool
Eq, Eq FileOperationRegistrationOptions
FileOperationRegistrationOptions
-> FileOperationRegistrationOptions -> Bool
FileOperationRegistrationOptions
-> FileOperationRegistrationOptions -> Ordering
FileOperationRegistrationOptions
-> FileOperationRegistrationOptions
-> FileOperationRegistrationOptions
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 :: FileOperationRegistrationOptions
-> FileOperationRegistrationOptions
-> FileOperationRegistrationOptions
$cmin :: FileOperationRegistrationOptions
-> FileOperationRegistrationOptions
-> FileOperationRegistrationOptions
max :: FileOperationRegistrationOptions
-> FileOperationRegistrationOptions
-> FileOperationRegistrationOptions
$cmax :: FileOperationRegistrationOptions
-> FileOperationRegistrationOptions
-> FileOperationRegistrationOptions
>= :: FileOperationRegistrationOptions
-> FileOperationRegistrationOptions -> Bool
$c>= :: FileOperationRegistrationOptions
-> FileOperationRegistrationOptions -> Bool
> :: FileOperationRegistrationOptions
-> FileOperationRegistrationOptions -> Bool
$c> :: FileOperationRegistrationOptions
-> FileOperationRegistrationOptions -> Bool
<= :: FileOperationRegistrationOptions
-> FileOperationRegistrationOptions -> Bool
$c<= :: FileOperationRegistrationOptions
-> FileOperationRegistrationOptions -> Bool
< :: FileOperationRegistrationOptions
-> FileOperationRegistrationOptions -> Bool
$c< :: FileOperationRegistrationOptions
-> FileOperationRegistrationOptions -> Bool
compare :: FileOperationRegistrationOptions
-> FileOperationRegistrationOptions -> Ordering
$ccompare :: FileOperationRegistrationOptions
-> FileOperationRegistrationOptions -> Ordering
Ord, forall x.
Rep FileOperationRegistrationOptions x
-> FileOperationRegistrationOptions
forall x.
FileOperationRegistrationOptions
-> Rep FileOperationRegistrationOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FileOperationRegistrationOptions x
-> FileOperationRegistrationOptions
$cfrom :: forall x.
FileOperationRegistrationOptions
-> Rep FileOperationRegistrationOptions x
Generic)
  deriving anyclass (FileOperationRegistrationOptions -> ()
forall a. (a -> ()) -> NFData a
rnf :: FileOperationRegistrationOptions -> ()
$crnf :: FileOperationRegistrationOptions -> ()
NFData, Eq FileOperationRegistrationOptions
Int -> FileOperationRegistrationOptions -> Int
FileOperationRegistrationOptions -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: FileOperationRegistrationOptions -> Int
$chash :: FileOperationRegistrationOptions -> Int
hashWithSalt :: Int -> FileOperationRegistrationOptions -> Int
$chashWithSalt :: Int -> FileOperationRegistrationOptions -> Int
Hashable)
  deriving forall ann. [FileOperationRegistrationOptions] -> Doc ann
forall ann. FileOperationRegistrationOptions -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [FileOperationRegistrationOptions] -> Doc ann
$cprettyList :: forall ann. [FileOperationRegistrationOptions] -> Doc ann
pretty :: forall ann. FileOperationRegistrationOptions -> Doc ann
$cpretty :: forall ann. FileOperationRegistrationOptions -> Doc ann
Pretty via (ViaJSON FileOperationRegistrationOptions)

instance Aeson.ToJSON FileOperationRegistrationOptions where
  toJSON :: FileOperationRegistrationOptions -> Value
toJSON (FileOperationRegistrationOptions [FileOperationFilter]
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
$  [[Key
"filters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Aeson..= [FileOperationFilter]
arg0]]

instance Aeson.FromJSON FileOperationRegistrationOptions where
  parseJSON :: Value -> Parser FileOperationRegistrationOptions
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"FileOperationRegistrationOptions" forall a b. (a -> b) -> a -> b
$ \Object
arg -> [FileOperationFilter] -> FileOperationRegistrationOptions
FileOperationRegistrationOptions forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"filters"