{- 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.SelectionRangeClientCapabilities 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 SelectionRangeClientCapabilities = SelectionRangeClientCapabilities 
  { {-|
  Whether implementation supports dynamic registration for selection range providers. If this is set to `true`
  the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server
  capability as well.
  -}
  SelectionRangeClientCapabilities -> Maybe Bool
_dynamicRegistration :: (Maybe Bool)
  }
  deriving stock (Int -> SelectionRangeClientCapabilities -> ShowS
[SelectionRangeClientCapabilities] -> ShowS
SelectionRangeClientCapabilities -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SelectionRangeClientCapabilities] -> ShowS
$cshowList :: [SelectionRangeClientCapabilities] -> ShowS
show :: SelectionRangeClientCapabilities -> String
$cshow :: SelectionRangeClientCapabilities -> String
showsPrec :: Int -> SelectionRangeClientCapabilities -> ShowS
$cshowsPrec :: Int -> SelectionRangeClientCapabilities -> ShowS
Show, SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities -> Bool
$c/= :: SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities -> Bool
== :: SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities -> Bool
$c== :: SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities -> Bool
Eq, Eq SelectionRangeClientCapabilities
SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities -> Bool
SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities -> Ordering
SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities
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 :: SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities
$cmin :: SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities
max :: SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities
$cmax :: SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities
>= :: SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities -> Bool
$c>= :: SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities -> Bool
> :: SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities -> Bool
$c> :: SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities -> Bool
<= :: SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities -> Bool
$c<= :: SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities -> Bool
< :: SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities -> Bool
$c< :: SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities -> Bool
compare :: SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities -> Ordering
$ccompare :: SelectionRangeClientCapabilities
-> SelectionRangeClientCapabilities -> Ordering
Ord, forall x.
Rep SelectionRangeClientCapabilities x
-> SelectionRangeClientCapabilities
forall x.
SelectionRangeClientCapabilities
-> Rep SelectionRangeClientCapabilities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SelectionRangeClientCapabilities x
-> SelectionRangeClientCapabilities
$cfrom :: forall x.
SelectionRangeClientCapabilities
-> Rep SelectionRangeClientCapabilities x
Generic)
  deriving anyclass (SelectionRangeClientCapabilities -> ()
forall a. (a -> ()) -> NFData a
rnf :: SelectionRangeClientCapabilities -> ()
$crnf :: SelectionRangeClientCapabilities -> ()
NFData, Eq SelectionRangeClientCapabilities
Int -> SelectionRangeClientCapabilities -> Int
SelectionRangeClientCapabilities -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: SelectionRangeClientCapabilities -> Int
$chash :: SelectionRangeClientCapabilities -> Int
hashWithSalt :: Int -> SelectionRangeClientCapabilities -> Int
$chashWithSalt :: Int -> SelectionRangeClientCapabilities -> Int
Hashable)
  deriving forall ann. [SelectionRangeClientCapabilities] -> Doc ann
forall ann. SelectionRangeClientCapabilities -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [SelectionRangeClientCapabilities] -> Doc ann
$cprettyList :: forall ann. [SelectionRangeClientCapabilities] -> Doc ann
pretty :: forall ann. SelectionRangeClientCapabilities -> Doc ann
$cpretty :: forall ann. SelectionRangeClientCapabilities -> Doc ann
Pretty via (ViaJSON SelectionRangeClientCapabilities)

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

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