{- 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
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DocumentColorOptions] -> ShowS
$cshowList :: [DocumentColorOptions] -> ShowS
show :: DocumentColorOptions -> String
$cshow :: DocumentColorOptions -> String
showsPrec :: Int -> DocumentColorOptions -> ShowS
$cshowsPrec :: Int -> DocumentColorOptions -> ShowS
Show, DocumentColorOptions -> DocumentColorOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DocumentColorOptions -> DocumentColorOptions -> Bool
$c/= :: DocumentColorOptions -> DocumentColorOptions -> Bool
== :: DocumentColorOptions -> DocumentColorOptions -> Bool
$c== :: DocumentColorOptions -> DocumentColorOptions -> Bool
Eq, Eq 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
min :: DocumentColorOptions
-> DocumentColorOptions -> DocumentColorOptions
$cmin :: DocumentColorOptions
-> DocumentColorOptions -> DocumentColorOptions
max :: DocumentColorOptions
-> DocumentColorOptions -> DocumentColorOptions
$cmax :: DocumentColorOptions
-> DocumentColorOptions -> DocumentColorOptions
>= :: DocumentColorOptions -> DocumentColorOptions -> Bool
$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
compare :: DocumentColorOptions -> DocumentColorOptions -> Ordering
$ccompare :: DocumentColorOptions -> DocumentColorOptions -> Ordering
Ord, 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
$cto :: forall x. Rep DocumentColorOptions x -> DocumentColorOptions
$cfrom :: forall x. DocumentColorOptions -> Rep DocumentColorOptions x
Generic)
  deriving anyclass (DocumentColorOptions -> ()
forall a. (a -> ()) -> NFData a
rnf :: DocumentColorOptions -> ()
$crnf :: DocumentColorOptions -> ()
NFData, Eq DocumentColorOptions
Int -> DocumentColorOptions -> Int
DocumentColorOptions -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: DocumentColorOptions -> Int
$chash :: DocumentColorOptions -> Int
hashWithSalt :: Int -> DocumentColorOptions -> Int
$chashWithSalt :: Int -> DocumentColorOptions -> Int
Hashable)
  deriving forall ann. [DocumentColorOptions] -> Doc ann
forall ann. DocumentColorOptions -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [DocumentColorOptions] -> Doc ann
$cprettyList :: forall ann. [DocumentColorOptions] -> Doc ann
pretty :: forall ann. DocumentColorOptions -> Doc ann
$cpretty :: 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 forall a b. (a -> b) -> a -> b
$ forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat forall a b. (a -> b) -> a -> b
$  [String
"workDoneProgress" forall kv v. (KeyValue 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 = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"DocumentColorOptions" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool -> DocumentColorOptions
DocumentColorOptions forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Aeson..:! Key
"workDoneProgress"