{- 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.DidCloseNotebookDocumentParams 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.NotebookDocumentIdentifier
import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier
import qualified Language.LSP.Protocol.Types.Common

{-|
The params sent in a close notebook document notification.

@since 3.17.0
-}
data DidCloseNotebookDocumentParams = DidCloseNotebookDocumentParams 
  { {-|
  The notebook document that got closed.
  -}
  DidCloseNotebookDocumentParams -> NotebookDocumentIdentifier
_notebookDocument :: Language.LSP.Protocol.Internal.Types.NotebookDocumentIdentifier.NotebookDocumentIdentifier
  , {-|
  The text documents that represent the content
  of a notebook cell that got closed.
  -}
  DidCloseNotebookDocumentParams -> [TextDocumentIdentifier]
_cellTextDocuments :: [Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier]
  }
  deriving stock (Int -> DidCloseNotebookDocumentParams -> ShowS
[DidCloseNotebookDocumentParams] -> ShowS
DidCloseNotebookDocumentParams -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DidCloseNotebookDocumentParams] -> ShowS
$cshowList :: [DidCloseNotebookDocumentParams] -> ShowS
show :: DidCloseNotebookDocumentParams -> String
$cshow :: DidCloseNotebookDocumentParams -> String
showsPrec :: Int -> DidCloseNotebookDocumentParams -> ShowS
$cshowsPrec :: Int -> DidCloseNotebookDocumentParams -> ShowS
Show, DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> Bool
$c/= :: DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> Bool
== :: DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> Bool
$c== :: DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> Bool
Eq, Eq DidCloseNotebookDocumentParams
DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> Bool
DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> Ordering
DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> DidCloseNotebookDocumentParams
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 :: DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> DidCloseNotebookDocumentParams
$cmin :: DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> DidCloseNotebookDocumentParams
max :: DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> DidCloseNotebookDocumentParams
$cmax :: DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> DidCloseNotebookDocumentParams
>= :: DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> Bool
$c>= :: DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> Bool
> :: DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> Bool
$c> :: DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> Bool
<= :: DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> Bool
$c<= :: DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> Bool
< :: DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> Bool
$c< :: DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> Bool
compare :: DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> Ordering
$ccompare :: DidCloseNotebookDocumentParams
-> DidCloseNotebookDocumentParams -> Ordering
Ord, forall x.
Rep DidCloseNotebookDocumentParams x
-> DidCloseNotebookDocumentParams
forall x.
DidCloseNotebookDocumentParams
-> Rep DidCloseNotebookDocumentParams x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DidCloseNotebookDocumentParams x
-> DidCloseNotebookDocumentParams
$cfrom :: forall x.
DidCloseNotebookDocumentParams
-> Rep DidCloseNotebookDocumentParams x
Generic)
  deriving anyclass (DidCloseNotebookDocumentParams -> ()
forall a. (a -> ()) -> NFData a
rnf :: DidCloseNotebookDocumentParams -> ()
$crnf :: DidCloseNotebookDocumentParams -> ()
NFData, Eq DidCloseNotebookDocumentParams
Int -> DidCloseNotebookDocumentParams -> Int
DidCloseNotebookDocumentParams -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: DidCloseNotebookDocumentParams -> Int
$chash :: DidCloseNotebookDocumentParams -> Int
hashWithSalt :: Int -> DidCloseNotebookDocumentParams -> Int
$chashWithSalt :: Int -> DidCloseNotebookDocumentParams -> Int
Hashable)
  deriving forall ann. [DidCloseNotebookDocumentParams] -> Doc ann
forall ann. DidCloseNotebookDocumentParams -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [DidCloseNotebookDocumentParams] -> Doc ann
$cprettyList :: forall ann. [DidCloseNotebookDocumentParams] -> Doc ann
pretty :: forall ann. DidCloseNotebookDocumentParams -> Doc ann
$cpretty :: forall ann. DidCloseNotebookDocumentParams -> Doc ann
Pretty via (ViaJSON DidCloseNotebookDocumentParams)

instance Aeson.ToJSON DidCloseNotebookDocumentParams where
  toJSON :: DidCloseNotebookDocumentParams -> Value
toJSON (DidCloseNotebookDocumentParams NotebookDocumentIdentifier
arg0 [TextDocumentIdentifier]
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
$  [[Key
"notebookDocument" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Aeson..= NotebookDocumentIdentifier
arg0]
    ,[Key
"cellTextDocuments" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Aeson..= [TextDocumentIdentifier]
arg1]]

instance Aeson.FromJSON DidCloseNotebookDocumentParams where
  parseJSON :: Value -> Parser DidCloseNotebookDocumentParams
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"DidCloseNotebookDocumentParams" forall a b. (a -> b) -> a -> b
$ \Object
arg -> NotebookDocumentIdentifier
-> [TextDocumentIdentifier] -> DidCloseNotebookDocumentParams
DidCloseNotebookDocumentParams forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"notebookDocument" forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
arg forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"cellTextDocuments"