{- 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.DocumentRangeFormattingClientCapabilities 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

{-|
Client capabilities of a `DocumentRangeFormattingRequest`.
-}
data DocumentRangeFormattingClientCapabilities = DocumentRangeFormattingClientCapabilities 
  { {-|
  Whether range formatting supports dynamic registration.
  -}
  DocumentRangeFormattingClientCapabilities -> Maybe Bool
_dynamicRegistration :: (Maybe Bool)
  }
  deriving stock (Int -> DocumentRangeFormattingClientCapabilities -> ShowS
[DocumentRangeFormattingClientCapabilities] -> ShowS
DocumentRangeFormattingClientCapabilities -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DocumentRangeFormattingClientCapabilities] -> ShowS
$cshowList :: [DocumentRangeFormattingClientCapabilities] -> ShowS
show :: DocumentRangeFormattingClientCapabilities -> String
$cshow :: DocumentRangeFormattingClientCapabilities -> String
showsPrec :: Int -> DocumentRangeFormattingClientCapabilities -> ShowS
$cshowsPrec :: Int -> DocumentRangeFormattingClientCapabilities -> ShowS
Show, DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities -> Bool
$c/= :: DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities -> Bool
== :: DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities -> Bool
$c== :: DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities -> Bool
Eq, Eq DocumentRangeFormattingClientCapabilities
DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities -> Bool
DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities -> Ordering
DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities
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 :: DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities
$cmin :: DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities
max :: DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities
$cmax :: DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities
>= :: DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities -> Bool
$c>= :: DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities -> Bool
> :: DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities -> Bool
$c> :: DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities -> Bool
<= :: DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities -> Bool
$c<= :: DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities -> Bool
< :: DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities -> Bool
$c< :: DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities -> Bool
compare :: DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities -> Ordering
$ccompare :: DocumentRangeFormattingClientCapabilities
-> DocumentRangeFormattingClientCapabilities -> Ordering
Ord, forall x.
Rep DocumentRangeFormattingClientCapabilities x
-> DocumentRangeFormattingClientCapabilities
forall x.
DocumentRangeFormattingClientCapabilities
-> Rep DocumentRangeFormattingClientCapabilities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DocumentRangeFormattingClientCapabilities x
-> DocumentRangeFormattingClientCapabilities
$cfrom :: forall x.
DocumentRangeFormattingClientCapabilities
-> Rep DocumentRangeFormattingClientCapabilities x
Generic)
  deriving anyclass (DocumentRangeFormattingClientCapabilities -> ()
forall a. (a -> ()) -> NFData a
rnf :: DocumentRangeFormattingClientCapabilities -> ()
$crnf :: DocumentRangeFormattingClientCapabilities -> ()
NFData, Eq DocumentRangeFormattingClientCapabilities
Int -> DocumentRangeFormattingClientCapabilities -> Int
DocumentRangeFormattingClientCapabilities -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: DocumentRangeFormattingClientCapabilities -> Int
$chash :: DocumentRangeFormattingClientCapabilities -> Int
hashWithSalt :: Int -> DocumentRangeFormattingClientCapabilities -> Int
$chashWithSalt :: Int -> DocumentRangeFormattingClientCapabilities -> Int
Hashable)
  deriving forall ann. [DocumentRangeFormattingClientCapabilities] -> Doc ann
forall ann. DocumentRangeFormattingClientCapabilities -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [DocumentRangeFormattingClientCapabilities] -> Doc ann
$cprettyList :: forall ann. [DocumentRangeFormattingClientCapabilities] -> Doc ann
pretty :: forall ann. DocumentRangeFormattingClientCapabilities -> Doc ann
$cpretty :: forall ann. DocumentRangeFormattingClientCapabilities -> Doc ann
Pretty via (ViaJSON DocumentRangeFormattingClientCapabilities)

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