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