{- 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.NotebookCellLanguage 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

{-|
@since 3.18.0
@proposed
-}
data NotebookCellLanguage = NotebookCellLanguage 
  { {-|

  -}
  NotebookCellLanguage -> Text
_language :: Data.Text.Text
  }
  deriving stock (Int -> NotebookCellLanguage -> ShowS
[NotebookCellLanguage] -> ShowS
NotebookCellLanguage -> String
(Int -> NotebookCellLanguage -> ShowS)
-> (NotebookCellLanguage -> String)
-> ([NotebookCellLanguage] -> ShowS)
-> Show NotebookCellLanguage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NotebookCellLanguage -> ShowS
showsPrec :: Int -> NotebookCellLanguage -> ShowS
$cshow :: NotebookCellLanguage -> String
show :: NotebookCellLanguage -> String
$cshowList :: [NotebookCellLanguage] -> ShowS
showList :: [NotebookCellLanguage] -> ShowS
Show, NotebookCellLanguage -> NotebookCellLanguage -> Bool
(NotebookCellLanguage -> NotebookCellLanguage -> Bool)
-> (NotebookCellLanguage -> NotebookCellLanguage -> Bool)
-> Eq NotebookCellLanguage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NotebookCellLanguage -> NotebookCellLanguage -> Bool
== :: NotebookCellLanguage -> NotebookCellLanguage -> Bool
$c/= :: NotebookCellLanguage -> NotebookCellLanguage -> Bool
/= :: NotebookCellLanguage -> NotebookCellLanguage -> Bool
Eq, Eq NotebookCellLanguage
Eq NotebookCellLanguage =>
(NotebookCellLanguage -> NotebookCellLanguage -> Ordering)
-> (NotebookCellLanguage -> NotebookCellLanguage -> Bool)
-> (NotebookCellLanguage -> NotebookCellLanguage -> Bool)
-> (NotebookCellLanguage -> NotebookCellLanguage -> Bool)
-> (NotebookCellLanguage -> NotebookCellLanguage -> Bool)
-> (NotebookCellLanguage
    -> NotebookCellLanguage -> NotebookCellLanguage)
-> (NotebookCellLanguage
    -> NotebookCellLanguage -> NotebookCellLanguage)
-> Ord NotebookCellLanguage
NotebookCellLanguage -> NotebookCellLanguage -> Bool
NotebookCellLanguage -> NotebookCellLanguage -> Ordering
NotebookCellLanguage
-> NotebookCellLanguage -> NotebookCellLanguage
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
$ccompare :: NotebookCellLanguage -> NotebookCellLanguage -> Ordering
compare :: NotebookCellLanguage -> NotebookCellLanguage -> Ordering
$c< :: NotebookCellLanguage -> NotebookCellLanguage -> Bool
< :: NotebookCellLanguage -> NotebookCellLanguage -> Bool
$c<= :: NotebookCellLanguage -> NotebookCellLanguage -> Bool
<= :: NotebookCellLanguage -> NotebookCellLanguage -> Bool
$c> :: NotebookCellLanguage -> NotebookCellLanguage -> Bool
> :: NotebookCellLanguage -> NotebookCellLanguage -> Bool
$c>= :: NotebookCellLanguage -> NotebookCellLanguage -> Bool
>= :: NotebookCellLanguage -> NotebookCellLanguage -> Bool
$cmax :: NotebookCellLanguage
-> NotebookCellLanguage -> NotebookCellLanguage
max :: NotebookCellLanguage
-> NotebookCellLanguage -> NotebookCellLanguage
$cmin :: NotebookCellLanguage
-> NotebookCellLanguage -> NotebookCellLanguage
min :: NotebookCellLanguage
-> NotebookCellLanguage -> NotebookCellLanguage
Ord, (forall x. NotebookCellLanguage -> Rep NotebookCellLanguage x)
-> (forall x. Rep NotebookCellLanguage x -> NotebookCellLanguage)
-> Generic NotebookCellLanguage
forall x. Rep NotebookCellLanguage x -> NotebookCellLanguage
forall x. NotebookCellLanguage -> Rep NotebookCellLanguage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. NotebookCellLanguage -> Rep NotebookCellLanguage x
from :: forall x. NotebookCellLanguage -> Rep NotebookCellLanguage x
$cto :: forall x. Rep NotebookCellLanguage x -> NotebookCellLanguage
to :: forall x. Rep NotebookCellLanguage x -> NotebookCellLanguage
Generic)
  deriving anyclass (NotebookCellLanguage -> ()
(NotebookCellLanguage -> ()) -> NFData NotebookCellLanguage
forall a. (a -> ()) -> NFData a
$crnf :: NotebookCellLanguage -> ()
rnf :: NotebookCellLanguage -> ()
NFData, Eq NotebookCellLanguage
Eq NotebookCellLanguage =>
(Int -> NotebookCellLanguage -> Int)
-> (NotebookCellLanguage -> Int) -> Hashable NotebookCellLanguage
Int -> NotebookCellLanguage -> Int
NotebookCellLanguage -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> NotebookCellLanguage -> Int
hashWithSalt :: Int -> NotebookCellLanguage -> Int
$chash :: NotebookCellLanguage -> Int
hash :: NotebookCellLanguage -> Int
Hashable)
  deriving (forall ann. NotebookCellLanguage -> Doc ann)
-> (forall ann. [NotebookCellLanguage] -> Doc ann)
-> Pretty NotebookCellLanguage
forall ann. [NotebookCellLanguage] -> Doc ann
forall ann. NotebookCellLanguage -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. NotebookCellLanguage -> Doc ann
pretty :: forall ann. NotebookCellLanguage -> Doc ann
$cprettyList :: forall ann. [NotebookCellLanguage] -> Doc ann
prettyList :: forall ann. [NotebookCellLanguage] -> Doc ann
Pretty via (ViaJSON NotebookCellLanguage)

instance Aeson.ToJSON NotebookCellLanguage where
  toJSON :: NotebookCellLanguage -> Value
toJSON (NotebookCellLanguage Text
arg0) = [Pair] -> Value
Aeson.object ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$ [[Pair]] -> [Pair]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat ([[Pair]] -> [Pair]) -> [[Pair]] -> [Pair]
forall a b. (a -> b) -> a -> b
$  [[Key
"language" Key -> Text -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= Text
arg0]]

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