-- 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.NotebookDocumentIdentifier where

import Control.DeepSeq
import Data.Hashable
import GHC.Generics
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.Types.Common
import qualified Language.LSP.Protocol.Types.Uri

{-|
A literal to identify a notebook document in the client.

@since 3.17.0
-}
data NotebookDocumentIdentifier = NotebookDocumentIdentifier 
  { {-|
  The notebook document's uri.
  -}
  NotebookDocumentIdentifier -> Uri
_uri :: Language.LSP.Protocol.Types.Uri.Uri
  }
  deriving stock (Int -> NotebookDocumentIdentifier -> ShowS
[NotebookDocumentIdentifier] -> ShowS
NotebookDocumentIdentifier -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NotebookDocumentIdentifier] -> ShowS
$cshowList :: [NotebookDocumentIdentifier] -> ShowS
show :: NotebookDocumentIdentifier -> String
$cshow :: NotebookDocumentIdentifier -> String
showsPrec :: Int -> NotebookDocumentIdentifier -> ShowS
$cshowsPrec :: Int -> NotebookDocumentIdentifier -> ShowS
Show, NotebookDocumentIdentifier -> NotebookDocumentIdentifier -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NotebookDocumentIdentifier -> NotebookDocumentIdentifier -> Bool
$c/= :: NotebookDocumentIdentifier -> NotebookDocumentIdentifier -> Bool
== :: NotebookDocumentIdentifier -> NotebookDocumentIdentifier -> Bool
$c== :: NotebookDocumentIdentifier -> NotebookDocumentIdentifier -> Bool
Eq, Eq NotebookDocumentIdentifier
NotebookDocumentIdentifier -> NotebookDocumentIdentifier -> Bool
NotebookDocumentIdentifier
-> NotebookDocumentIdentifier -> Ordering
NotebookDocumentIdentifier
-> NotebookDocumentIdentifier -> NotebookDocumentIdentifier
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 :: NotebookDocumentIdentifier
-> NotebookDocumentIdentifier -> NotebookDocumentIdentifier
$cmin :: NotebookDocumentIdentifier
-> NotebookDocumentIdentifier -> NotebookDocumentIdentifier
max :: NotebookDocumentIdentifier
-> NotebookDocumentIdentifier -> NotebookDocumentIdentifier
$cmax :: NotebookDocumentIdentifier
-> NotebookDocumentIdentifier -> NotebookDocumentIdentifier
>= :: NotebookDocumentIdentifier -> NotebookDocumentIdentifier -> Bool
$c>= :: NotebookDocumentIdentifier -> NotebookDocumentIdentifier -> Bool
> :: NotebookDocumentIdentifier -> NotebookDocumentIdentifier -> Bool
$c> :: NotebookDocumentIdentifier -> NotebookDocumentIdentifier -> Bool
<= :: NotebookDocumentIdentifier -> NotebookDocumentIdentifier -> Bool
$c<= :: NotebookDocumentIdentifier -> NotebookDocumentIdentifier -> Bool
< :: NotebookDocumentIdentifier -> NotebookDocumentIdentifier -> Bool
$c< :: NotebookDocumentIdentifier -> NotebookDocumentIdentifier -> Bool
compare :: NotebookDocumentIdentifier
-> NotebookDocumentIdentifier -> Ordering
$ccompare :: NotebookDocumentIdentifier
-> NotebookDocumentIdentifier -> Ordering
Ord, forall x.
Rep NotebookDocumentIdentifier x -> NotebookDocumentIdentifier
forall x.
NotebookDocumentIdentifier -> Rep NotebookDocumentIdentifier x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep NotebookDocumentIdentifier x -> NotebookDocumentIdentifier
$cfrom :: forall x.
NotebookDocumentIdentifier -> Rep NotebookDocumentIdentifier x
Generic)
  deriving anyclass (NotebookDocumentIdentifier -> ()
forall a. (a -> ()) -> NFData a
rnf :: NotebookDocumentIdentifier -> ()
$crnf :: NotebookDocumentIdentifier -> ()
NFData, Eq NotebookDocumentIdentifier
Int -> NotebookDocumentIdentifier -> Int
NotebookDocumentIdentifier -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: NotebookDocumentIdentifier -> Int
$chash :: NotebookDocumentIdentifier -> Int
hashWithSalt :: Int -> NotebookDocumentIdentifier -> Int
$chashWithSalt :: Int -> NotebookDocumentIdentifier -> Int
Hashable)

instance Aeson.ToJSON NotebookDocumentIdentifier where
  toJSON :: NotebookDocumentIdentifier -> Value
toJSON (NotebookDocumentIdentifier Uri
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..= Uri
arg0]]

instance Aeson.FromJSON NotebookDocumentIdentifier where
  parseJSON :: Value -> Parser NotebookDocumentIdentifier
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"NotebookDocumentIdentifier" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Uri -> NotebookDocumentIdentifier
NotebookDocumentIdentifier 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"