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

{-|
The parameters of a `workspace/didChangeWorkspaceFolders` notification.
-}
data DidChangeWorkspaceFoldersParams = DidChangeWorkspaceFoldersParams 
  { {-|
  The actual workspace folder change event.
  -}
  DidChangeWorkspaceFoldersParams -> WorkspaceFoldersChangeEvent
_event :: Language.LSP.Protocol.Internal.Types.WorkspaceFoldersChangeEvent.WorkspaceFoldersChangeEvent
  }
  deriving stock (Int -> DidChangeWorkspaceFoldersParams -> ShowS
[DidChangeWorkspaceFoldersParams] -> ShowS
DidChangeWorkspaceFoldersParams -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DidChangeWorkspaceFoldersParams] -> ShowS
$cshowList :: [DidChangeWorkspaceFoldersParams] -> ShowS
show :: DidChangeWorkspaceFoldersParams -> String
$cshow :: DidChangeWorkspaceFoldersParams -> String
showsPrec :: Int -> DidChangeWorkspaceFoldersParams -> ShowS
$cshowsPrec :: Int -> DidChangeWorkspaceFoldersParams -> ShowS
Show, DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams -> Bool
$c/= :: DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams -> Bool
== :: DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams -> Bool
$c== :: DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams -> Bool
Eq, Eq DidChangeWorkspaceFoldersParams
DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams -> Bool
DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams -> Ordering
DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams
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 :: DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams
$cmin :: DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams
max :: DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams
$cmax :: DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams
>= :: DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams -> Bool
$c>= :: DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams -> Bool
> :: DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams -> Bool
$c> :: DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams -> Bool
<= :: DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams -> Bool
$c<= :: DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams -> Bool
< :: DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams -> Bool
$c< :: DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams -> Bool
compare :: DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams -> Ordering
$ccompare :: DidChangeWorkspaceFoldersParams
-> DidChangeWorkspaceFoldersParams -> Ordering
Ord, forall x.
Rep DidChangeWorkspaceFoldersParams x
-> DidChangeWorkspaceFoldersParams
forall x.
DidChangeWorkspaceFoldersParams
-> Rep DidChangeWorkspaceFoldersParams x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DidChangeWorkspaceFoldersParams x
-> DidChangeWorkspaceFoldersParams
$cfrom :: forall x.
DidChangeWorkspaceFoldersParams
-> Rep DidChangeWorkspaceFoldersParams x
Generic)
  deriving anyclass (DidChangeWorkspaceFoldersParams -> ()
forall a. (a -> ()) -> NFData a
rnf :: DidChangeWorkspaceFoldersParams -> ()
$crnf :: DidChangeWorkspaceFoldersParams -> ()
NFData, Eq DidChangeWorkspaceFoldersParams
Int -> DidChangeWorkspaceFoldersParams -> Int
DidChangeWorkspaceFoldersParams -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: DidChangeWorkspaceFoldersParams -> Int
$chash :: DidChangeWorkspaceFoldersParams -> Int
hashWithSalt :: Int -> DidChangeWorkspaceFoldersParams -> Int
$chashWithSalt :: Int -> DidChangeWorkspaceFoldersParams -> Int
Hashable)
  deriving forall ann. [DidChangeWorkspaceFoldersParams] -> Doc ann
forall ann. DidChangeWorkspaceFoldersParams -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [DidChangeWorkspaceFoldersParams] -> Doc ann
$cprettyList :: forall ann. [DidChangeWorkspaceFoldersParams] -> Doc ann
pretty :: forall ann. DidChangeWorkspaceFoldersParams -> Doc ann
$cpretty :: forall ann. DidChangeWorkspaceFoldersParams -> Doc ann
Pretty via (ViaJSON DidChangeWorkspaceFoldersParams)

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

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