{- 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.FileDelete 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.Text
import qualified Language.LSP.Protocol.Types.Common

{-|
Represents information on a file/folder delete.

@since 3.16.0
-}
data FileDelete = FileDelete 
  { {-|
  A file:// URI for the location of the file/folder being deleted.
  -}
  FileDelete -> Text
_uri :: Data.Text.Text
  }
  deriving stock (Int -> FileDelete -> ShowS
[FileDelete] -> ShowS
FileDelete -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FileDelete] -> ShowS
$cshowList :: [FileDelete] -> ShowS
show :: FileDelete -> String
$cshow :: FileDelete -> String
showsPrec :: Int -> FileDelete -> ShowS
$cshowsPrec :: Int -> FileDelete -> ShowS
Show, FileDelete -> FileDelete -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileDelete -> FileDelete -> Bool
$c/= :: FileDelete -> FileDelete -> Bool
== :: FileDelete -> FileDelete -> Bool
$c== :: FileDelete -> FileDelete -> Bool
Eq, Eq FileDelete
FileDelete -> FileDelete -> Bool
FileDelete -> FileDelete -> Ordering
FileDelete -> FileDelete -> FileDelete
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 :: FileDelete -> FileDelete -> FileDelete
$cmin :: FileDelete -> FileDelete -> FileDelete
max :: FileDelete -> FileDelete -> FileDelete
$cmax :: FileDelete -> FileDelete -> FileDelete
>= :: FileDelete -> FileDelete -> Bool
$c>= :: FileDelete -> FileDelete -> Bool
> :: FileDelete -> FileDelete -> Bool
$c> :: FileDelete -> FileDelete -> Bool
<= :: FileDelete -> FileDelete -> Bool
$c<= :: FileDelete -> FileDelete -> Bool
< :: FileDelete -> FileDelete -> Bool
$c< :: FileDelete -> FileDelete -> Bool
compare :: FileDelete -> FileDelete -> Ordering
$ccompare :: FileDelete -> FileDelete -> Ordering
Ord, forall x. Rep FileDelete x -> FileDelete
forall x. FileDelete -> Rep FileDelete x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FileDelete x -> FileDelete
$cfrom :: forall x. FileDelete -> Rep FileDelete x
Generic)
  deriving anyclass (FileDelete -> ()
forall a. (a -> ()) -> NFData a
rnf :: FileDelete -> ()
$crnf :: FileDelete -> ()
NFData, Eq FileDelete
Int -> FileDelete -> Int
FileDelete -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: FileDelete -> Int
$chash :: FileDelete -> Int
hashWithSalt :: Int -> FileDelete -> Int
$chashWithSalt :: Int -> FileDelete -> Int
Hashable)
  deriving forall ann. [FileDelete] -> Doc ann
forall ann. FileDelete -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [FileDelete] -> Doc ann
$cprettyList :: forall ann. [FileDelete] -> Doc ann
pretty :: forall ann. FileDelete -> Doc ann
$cpretty :: forall ann. FileDelete -> Doc ann
Pretty via (ViaJSON FileDelete)

instance Aeson.ToJSON FileDelete where
  toJSON :: FileDelete -> Value
toJSON (FileDelete Text
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
"uri" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Aeson..= Text
arg0]]

instance Aeson.FromJSON FileDelete where
  parseJSON :: Value -> Parser FileDelete
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"FileDelete" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Text -> FileDelete
FileDelete forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"uri"