{- 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.DocumentColorOptions 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.Types.Common

{-|

-}
data DocumentColorOptions = DocumentColorOptions 
  { {-|

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

instance Aeson.ToJSON DocumentColorOptions where
  toJSON :: DocumentColorOptions -> Value
toJSON (DocumentColorOptions Maybe Bool
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
$  [String
"workDoneProgress" String -> Maybe Bool -> [Pair]
forall e kv v.
(KeyValue e kv, ToJSON v) =>
String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg0]

instance Aeson.FromJSON DocumentColorOptions where
  parseJSON :: Value -> Parser DocumentColorOptions
parseJSON = String
-> (Object -> Parser DocumentColorOptions)
-> Value
-> Parser DocumentColorOptions
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"DocumentColorOptions" ((Object -> Parser DocumentColorOptions)
 -> Value -> Parser DocumentColorOptions)
-> (Object -> Parser DocumentColorOptions)
-> Value
-> Parser DocumentColorOptions
forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool -> DocumentColorOptions
DocumentColorOptions (Maybe Bool -> DocumentColorOptions)
-> Parser (Maybe Bool) -> Parser DocumentColorOptions
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg Object -> Key -> Parser (Maybe Bool)
forall v. FromJSON v => Object -> Key -> Parser (Maybe v)
Language.LSP.Protocol.Types.Common..:!? Key
"workDoneProgress"