{- 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.SelectionRangeOptions 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 SelectionRangeOptions = SelectionRangeOptions 
  { {-|

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

instance Aeson.ToJSON SelectionRangeOptions where
  toJSON :: SelectionRangeOptions -> Value
toJSON (SelectionRangeOptions 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 SelectionRangeOptions where
  parseJSON :: Value -> Parser SelectionRangeOptions
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"SelectionRangeOptions" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool -> SelectionRangeOptions
SelectionRangeOptions 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"