{- 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
(Int -> SelectionRangeOptions -> ShowS)
-> (SelectionRangeOptions -> String)
-> ([SelectionRangeOptions] -> ShowS)
-> Show SelectionRangeOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SelectionRangeOptions -> ShowS
showsPrec :: Int -> SelectionRangeOptions -> ShowS
$cshow :: SelectionRangeOptions -> String
show :: SelectionRangeOptions -> String
$cshowList :: [SelectionRangeOptions] -> ShowS
showList :: [SelectionRangeOptions] -> ShowS
Show, SelectionRangeOptions -> SelectionRangeOptions -> Bool
(SelectionRangeOptions -> SelectionRangeOptions -> Bool)
-> (SelectionRangeOptions -> SelectionRangeOptions -> Bool)
-> Eq SelectionRangeOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SelectionRangeOptions -> SelectionRangeOptions -> Bool
== :: SelectionRangeOptions -> SelectionRangeOptions -> Bool
$c/= :: SelectionRangeOptions -> SelectionRangeOptions -> Bool
/= :: SelectionRangeOptions -> SelectionRangeOptions -> Bool
Eq, Eq SelectionRangeOptions
Eq SelectionRangeOptions =>
(SelectionRangeOptions -> SelectionRangeOptions -> Ordering)
-> (SelectionRangeOptions -> SelectionRangeOptions -> Bool)
-> (SelectionRangeOptions -> SelectionRangeOptions -> Bool)
-> (SelectionRangeOptions -> SelectionRangeOptions -> Bool)
-> (SelectionRangeOptions -> SelectionRangeOptions -> Bool)
-> (SelectionRangeOptions
    -> SelectionRangeOptions -> SelectionRangeOptions)
-> (SelectionRangeOptions
    -> SelectionRangeOptions -> SelectionRangeOptions)
-> Ord 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
$ccompare :: SelectionRangeOptions -> SelectionRangeOptions -> Ordering
compare :: SelectionRangeOptions -> SelectionRangeOptions -> Ordering
$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
>= :: SelectionRangeOptions -> SelectionRangeOptions -> Bool
$cmax :: SelectionRangeOptions
-> SelectionRangeOptions -> SelectionRangeOptions
max :: SelectionRangeOptions
-> SelectionRangeOptions -> SelectionRangeOptions
$cmin :: SelectionRangeOptions
-> SelectionRangeOptions -> SelectionRangeOptions
min :: SelectionRangeOptions
-> SelectionRangeOptions -> SelectionRangeOptions
Ord, (forall x. SelectionRangeOptions -> Rep SelectionRangeOptions x)
-> (forall x. Rep SelectionRangeOptions x -> SelectionRangeOptions)
-> Generic SelectionRangeOptions
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
$cfrom :: forall x. SelectionRangeOptions -> Rep SelectionRangeOptions x
from :: forall x. SelectionRangeOptions -> Rep SelectionRangeOptions x
$cto :: forall x. Rep SelectionRangeOptions x -> SelectionRangeOptions
to :: forall x. Rep SelectionRangeOptions x -> SelectionRangeOptions
Generic)
  deriving anyclass (SelectionRangeOptions -> ()
(SelectionRangeOptions -> ()) -> NFData SelectionRangeOptions
forall a. (a -> ()) -> NFData a
$crnf :: SelectionRangeOptions -> ()
rnf :: SelectionRangeOptions -> ()
NFData, Eq SelectionRangeOptions
Eq SelectionRangeOptions =>
(Int -> SelectionRangeOptions -> Int)
-> (SelectionRangeOptions -> Int) -> Hashable SelectionRangeOptions
Int -> SelectionRangeOptions -> Int
SelectionRangeOptions -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> SelectionRangeOptions -> Int
hashWithSalt :: Int -> SelectionRangeOptions -> Int
$chash :: SelectionRangeOptions -> Int
hash :: SelectionRangeOptions -> Int
Hashable)
  deriving (forall ann. SelectionRangeOptions -> Doc ann)
-> (forall ann. [SelectionRangeOptions] -> Doc ann)
-> Pretty SelectionRangeOptions
forall ann. [SelectionRangeOptions] -> Doc ann
forall ann. SelectionRangeOptions -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. SelectionRangeOptions -> Doc ann
pretty :: forall ann. SelectionRangeOptions -> Doc ann
$cprettyList :: forall ann. [SelectionRangeOptions] -> Doc ann
prettyList :: 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 ([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 SelectionRangeOptions where
  parseJSON :: Value -> Parser SelectionRangeOptions
parseJSON = String
-> (Object -> Parser SelectionRangeOptions)
-> Value
-> Parser SelectionRangeOptions
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"SelectionRangeOptions" ((Object -> Parser SelectionRangeOptions)
 -> Value -> Parser SelectionRangeOptions)
-> (Object -> Parser SelectionRangeOptions)
-> Value
-> Parser SelectionRangeOptions
forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool -> SelectionRangeOptions
SelectionRangeOptions (Maybe Bool -> SelectionRangeOptions)
-> Parser (Maybe Bool) -> Parser SelectionRangeOptions
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"